Json
Contents
[
Hide
]
Aspose.Cells支持将工作簿转换为Json(JavaScript对象表示)文件。
将Excel工作簿转换为JSON
Aspose.Cells API支持将电子表格转换为JSON格式。要将工作簿导出为JSON,请将SaveFormat.Json作为Workbook.Save方法的第二个参数传递。您还可以使用JsonSaveOptions类来指定导出工作表到JSON的其他设置。
以下代码示例演示了如何使用SaveFormat.Json枚举成员将活动工作表导出为Json。请查看用于参考的代码将源文件转换为输出Json文件。
This file contains 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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Load your source workbook | |
Workbook workbook = new Workbook("Book1.xlsx"); | |
// convert the workbook to json file. | |
workbook.Save(dir + "book1.json"); |