使用 ImageOrPrintOptions 的 PageIndex 和 PageCount 属性按顺序呈现页面
Contents
[
Hide
]
可能的使用场景
你可以使用 Aspose.Cells for Python via .NET 及其ImageOrPrintOptions.page_index和ImageOrPrintOptions.page_count属性将Excel文件的一系列页面渲染为图像。当你的工作表中有大量,如数千页时,这些属性非常有用,但你只想渲染其中一些。这不仅可以节省处理时间,还能减少渲染过程的内存使用。
使用ImageOrPrintOptions的PageIndex和PageCount属性呈现页面序列
以下示例代码加载了sample Excel file并仅使用ImageOrPrintOptions.page_index和ImageOrPrintOptions.page_count属性呈现了页面4、5、6和7。以下是代码生成的呈现页面。