回复 1楼burns的帖子
burns 你好,
可以使用 PrintInfo 类来实现区域打印,通过设置 rowstart 和 rowend 属性。详细请参考帮助文档。
- FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
- // Allow printing of only 20 columns and 20 rows of cells
- printset.ColStart = 1;
- printset.ColEnd = 20;
- printset.RowStart = 1;
- printset.RowEnd = 20;
- printset.PrintType = FarPoint.Win.Spread.PrintType.CellRange;
- // Allow printing of only five pages
- printset.PageStart = 1;
- printset.PageEnd = 5;
- // Allow printing of the cell notes together at the end
- printset.PrintNotes = FarPoint.Win.Spread.PrintNotes.AtEnd;
- // Allow printing of the shapes
- printset.PrintShapes = true;
- // Allow printing of only rows and columns up to the last ones with data
- printset.UseMax = True;
- // Assign the printer settings to the sheet and print it
- fpSpread1.Sheets[0].PrintInfo = printset;
- fpSpread1.PrintSheet(0);
复制代码 |