杰森
Contents
[
Hide
]
Aspose.Cells 支持将工作簿转换为 Json(JavaScript Object Notation)文件。
将 Excel 工作簿转换为 JSON
Aspose.Cells API 提供将电子表格转换为 JSON 格式的支持。要将工作簿导出到 JSON,请通过保存格式.Json作为第二个参数工作簿.保存方法。您也可以使用JsonSave选项类以指定将工作表导出到 JSON 的其他设置。
下面的代码示例演示了通过使用将活动工作表导出到 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"); |