$("#print").click(function () {
let sheet =spread.getActiveSheet();
let row=sheet.getRowCount();
let p=Math.ceil(row/67);
for(var i=0;i<p;i++){
sheet.setRowPageBreak(67*i,true);
}
var printInfo = sheet.printInfo();
printInfo.fitPagesTall(6);
printInfo.fitPagesWide(1);
printInfo.showBorder(false);
printInfo.zoomFactor(0.5);
printInfo.footerRight("第 &P 共 &N");
printInfo.footerLeft("专用***")
spread.print();
});
这一个去掉也是一样:
for(var i=0;i<p;i++){
sheet.setRowPageBreak(67*i,true);
} |