按页将工作表转换为图像文件

工作簿 book = new Workbook("Sheet to Image by Page.xls");

工作表 sheet = book.Worksheets[0];

Aspose.Cells.Rendering.ImageOrPrintOptions 选项 =  Aspose.Cells.Rendering.ImageOrPrintOptions();

options.HorizontalResolution = 200;

options.VerticalResolution = 200;

options.ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff;

//Sheet2Image按页转换

SheetRender sr = new SheetRender(sheet, options);

对于 (int j = 0; j< sr.PageCount; j++)

{

	Bitmap pic = sr.ToImage(j);

	pic.Save(sheet.Name + " Page" + (j + 1) + ".tiff");

}

下载示例代码