Convert-JSON-to-Excel
Contents
[
Hide
]
Aspose.Cells for Python via Java は、Json(JavaScript Object Notation) ファイルの Excel ワークブックへの変換をサポートしています。
JSON を Excel ブックに変換
Aspose.Cells for Python via Java ライブラリが最適な決定を行うため、JSON を Excel ファイルに変換する方法を考える必要はありません。 Aspose.Cells for Python via Java API は、JSON 形式をスプレッドシートに変換するためのサポートを提供します。使用できますJsonLoadOptionsクラスを使用して、JSON を Workbook にインポートするための追加設定を指定します。
次のコード例は、JSON を Excel ブックにインポートする方法を示しています。変換するコードを参照してくださいソースファイル参照用のコードによって生成されたファイルに。
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
import jpype | |
import asposecells | |
jpype.startJVM() | |
from asposecells.api import Workbook | |
# Load Source JSON file | |
workbook = Workbook("sample.json") | |
# Save file to xlsx format | |
workbook.save("sample_out.xlsx") | |
jpype.shutdownJVM() |
JsonLoadOptions クラスを使用して追加の設定を指定する次のコード例は、JSON を Excel ワークブックにインポートする方法を示しています。変換するコードを参照してくださいソースファイル参照用のコードによって生成された xlsx ファイルに。
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
import jpype | |
import asposecells | |
jpype.startJVM() | |
from asposecells.api import Workbook, JsonLoadOptions | |
# Create an options of loading the file. | |
options = JsonLoadOptions() | |
# Indicates whether importing each attribute of JsonObject object as one worksheet when all child nodes are array nodes. | |
options.setMultipleWorksheets(True) | |
book = Workbook("sample.json", options) | |
# save file to xlsx format | |
book.save("sample_out2.xlsx") | |
jpype.shutdownJVM() |