将表格转换为ODS
Contents
[
Hide
]
Aspose.Cells for Python via .NET支持将带有表格的Excel文件转换为ODS文件。只需将文件保存为ODS格式,生成的ODS文件将拥有正常工作的表格。
示例代码
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# Source directory | |
sourceDir = RunExamples.Get_SourceDirectory() | |
# Output directory | |
outputDir = RunExamples.Get_OutputDirectory() | |
# Open an existing file that contains a table/list object in it | |
wb = Workbook(sourceDir + "SampleTable.xlsx") | |
# Save the file | |
wb.save(outputDir + "ConvertTableToOds_out.ods") |
示例代码生成的输出ODS文件已附上供您参考。