Convert-Excel-to-JSON
Contents
[
Hide
]
Aspose.Cells は、ワークブックを Json (JavaScript Object Notation) ファイルに変換することをサポートしています。
Excel ワークブックを JSON に変換
Apose.Cells for .NET ライブラリには最適な決定があるため、Excel ワークブックを JSON に変換する方法を考える必要はありません。 Aspose.Cells API は、スプレッドシートを JSON 形式に変換するためのサポートを提供します。ワークブックを JSON にエクスポートするには、次を渡します。SaveFormat.Jsonの 2 番目のパラメータとしてWorkbook.Save方法。使用することもできますJsonSaveOptionsクラスを使用して、ワークシートを JSON にエクスポートするための追加設定を指定します。
次のコード例は、Excel ワークブックを 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("sample.xlsx"); | |
//Convert the workbook to json file. | |
workbook.Save("sample_out.json"); |
JsonSaveOptions クラスを使用して追加の設定を指定する次のコード例は、Excel ワークブックを 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 | |
//Create an options of saving the file. | |
JsonSaveOptions options = new JsonSaveOptions(); | |
//Set the exporting range. | |
options.ExportArea = CellArea.CreateCellArea("B1", "C4"); | |
//Load your source workbook | |
Workbook workbook = new Workbook("sample.xlsx"); | |
//Convert the workbook to json file. | |
workbook.Save("sample_out.json", options); |