Unity: Convert excel sheet to Json / Scriptable object
unity2017 or later
npoi2.5.1 or later
-
Download sample project and open.
-
Right click on Sample.xlsx and
XlsToJson Settings...
. -
Click 'CREATE Importer'.
Source code is automatically generated.- Assets/Class_Character.cs
- Assets/Class_Stage.cs
Defines the table type. - Assets/Character.cs
- Assets/Stage.cs
Allows singleton access to tables. - Editor/XlsToJson/importer/*.cs
These files will link Excel and Json data.
-
Menu:
Tools/XlsToJson/[Create] Json Data
.
Json data will be generated in 'Resources/'. -
After editing Json data, Menu: Tools/XlsToJson/[Xlsx Update] Json Data -> SampleData.xlsx
Export Json data to Excel.
see more detail : https://www.create-forever.games/xls-to-json-en/
see more detail (japanese): https://www.create-forever.games/xls-to-json2/
This sample project includes the work that is distributed in the Apache License 2.0 / MIT / MIT X11.
NPOI (Apache2.0): https://www.nuget.org/packages/NPOI/2.5.1/License
SharpZLib (MIT): https://licenses.nuget.org/MIT
Portable.BouncyCastle (MIT X11): https://www.bouncycastle.org/csharp/licence.html