使用 ImageOrPrintOptions 的 PageIndex 和 PageCount 属性渲染页面序列

可能的使用场景

您可以使用 Aspose.Cells 将 Excel 文件的一系列页面呈现为图像ImageOrPrintOptions.PageIndexImageOrPrintOptions.PageCount特性。当您的工作表中有很多页面(例如数千页)但您只想呈现其中的一些页面时,这些属性很有用。这不仅会节省处理时间,还会节省渲染过程的内存消耗。

使用 ImageOrPrintOptions 的 PageIndex 和 PageCount 属性渲染页面序列

下面的示例代码加载示例 Excel 文件并且只渲染第 4、5、6 和 7 页ImageOrPrintOptions.PageIndexImageOrPrintOptions.PageCount特性。这是代码生成的渲染页面。

待办事项:图片_替代_文本 待办事项:图片_替代_文本
待办事项:图片_替代_文本 待办事项:图片_替代_文本

示例代码