找回密码
 立即注册

QQ登录

只需一步,快速开始

Litt101

注册会员

12

主题

40

帖子

134

积分

注册会员

积分
134
Litt101
注册会员   /  发表于:2024-9-13 10:02  /   查看:56  /  回复:1
1金币
image.png783377074.png

如上图展示,打印时表格分页,想要实现每页都有标题和表头,应该如何设置

1 个回复

倒序浏览
Wilson.Zhang
超级版主   /  发表于:6 天前
沙发
您好!分页后每页需要打印的标题行即每页需要重复打印的行,则可以通过PrintInfo:repeatRowStart()和PrintInfo:repeatRowEnd()设置需要重复打印的起始行和结束行即可,如下代码:
  1. var printInfo = sheet.printInfo();
  2. //  设置每页需要重复的行,包括起始行和结束行,即标题行
  3. printInfo.repeatRowStart(0);
  4. printInfo.repeatRowEnd(0);
复制代码


可以参考API文档了解详情:
Worksheet:printInfo()--https://demo.grapecity.com.cn/spreadjs/help/api/classes/GC.Spread.Sheets.Worksheet#printinfo
PrintInfo:repeatRowStart()--https://demo.grapecity.com.cn/spreadjs/help/api/classes/GC.Spread.Sheets.Print.PrintInfo#repeatrowstart
PrintInfo:repeatRowEnd()--https://demo.grapecity.com.cn/spreadjs/help/api/classes/GC.Spread.Sheets.Print.PrintInfo#repeatrowend
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部