附件数据是真实数据请勿外泄。
function finlPrint() {
spread.isPaintSuspended(true);
activeSheet.addColumns(0, 1);
activeSheet.getColumn(0).width(1);
activeSheet.deleteColumns(activeSheet.getColumnCount() - 1, 1);
spread.isPaintSuspended(false);
//activeSheet.setRowPageBreak(20, true);
//activeSheet.setColumnPageBreak(5, true);
var printInfo = activeSheet.printInfo();
printInfo.showColumnHeader(GcSpread.Sheets.PrintVisibilityType.Hide);
printInfo.showRowHeader(GcSpread.Sheets.PrintVisibilityType.Hide);
printInfo.showGridLine(false);
printInfo.showBorder(false);
//printInfo.paperSize(new GcSpread.Sheets.PaperSize(GcSpread.Sheets.PaperKind.A4));
//printInfo.paperSize(new GcSpread.Sheets.PaperSize(1900, 490));
printInfo.paperSize(new GcSpread.Sheets.PaperSize(1200, 750));
printInfo.orientation(GcSpread.Sheets.PrintPageOrientation.Landscape);//纵向
//printInfo.orientation(GcSpread.Sheets.PrintPageOrientation.Portrait);
printInfo.margin({ top: 0, bottom: 0, left: 10, right: 0, header: 0, footer: 0 });
printInfo.centering(GcSpread.Sheets.PrintCentering.Landscape);
printInfo.repeatRowStart(0);//重复打印
printInfo.repeatRowEnd(1);//重复打印
//printInfo.footerCenter("&P and &N");//页码
//printInfo.fitPagesTall(1);
printInfo.pageOrder(GcSpread.Sheets.PrintPageOrder.Auto);
activeSheet.printInfo(printInfo);
spread.print(0);
activeSheet.deleteColumns(0, 1);
} |
|