打印工作簿 Aspose.Cells
Contents
[
Hide
]
Aspose.Cells - 打印工作簿
完成电子表格创建后,您可能需要根据需要打印一份工作表的硬拷贝。打印时,MS Excel 假定您要打印整个工作表区域,除非您指定了您的选择。
打印工作表
C#
//Instantiating a Workbook object
Workbook workbook = new Workbook("../../data/test.xlsx");
//Create an object for ImageOptions
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
//Get the first worksheet
Worksheet sheet = workbook.Worksheets[0];
//Create a SheetRender object with respect to your desired sheet
SheetRender sr = new SheetRender(sheet, imgOptions);
//Print the worksheet
sr.ToPrinter("Samsung ML-1520 Series");
下载运行代码
下载打印工作簿形成以下任何一个社交编码网站:
欲了解更多详情,请访问打印工作簿.