Json
Contents
[
Hide
]
Aspose.Cells for Python via .NET支持将工作簿转换为Json(JavaScript Object Notation)文件。
将Excel工作簿转换为JSON
Aspose.Cells for Python via .NET API支持将电子表格转换为JSON格式。要将工作簿导出为JSON,请将第二个参数作为Workbook.save方法的SaveFormat.JSON传递。您还可以使用JsonSaveOptions类来指定导出工作表为JSON的附加设置。
以下代码示例演示了如何使用SaveFormat.JSON枚举成员将活动工作表导出为Json。请查看用于参考的代码将源文件转换为输出Json文件。
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 | |
# Load your source workbook | |
workbook = Workbook("Book1.xlsx") | |
# convert the workbook to json file. | |
workbook.save(dir + "book1.json") |