Jython 中的分页预览
Contents
[
Hide
]
Aspose.Cells - 分页预览
使用附加文档Aspose.Cells Java 对于 Jython.在这里您可以看到示例代码。
Jython代码
from aspose-cells import Settings
from com.aspose.cells import Workbook
class PageBreakPreview:
def __init__(self):
dataDir = Settings.dataDir + 'WorkingWithWorksheets/PageBreakPreview/'
workbook = Workbook(dataDir + "Book1.xls")
#Adding a new worksheet to the Workbook object
worksheets = workbook.getWorksheets()
worksheet = worksheets.get(0)
#Displaying the worksheet in page break preview
worksheet.setPageBreakPreview(True)
#Saving the modified Excel file in default format
workbook.save(dataDir + "output.xls")
# Print message
print "Page break preview is enabled for sheet 1, please check the output document."
if __name__ == '__main__':
PageBreakPreview()
下载运行代码
下载**附加文件 (Aspose.Cells)**来自以下任何社交编码网站: