{"id":13731246,"url":"https://github.com/joexi/Excel4Unity","last_synced_at":"2025-05-08T04:32:23.408Z","repository":{"id":49327007,"uuid":"47182491","full_name":"joexi/Excel4Unity","owner":"joexi","description":"Excel for Unity. Provides both read and write with .xls and .xlsx","archived":false,"fork":false,"pushed_at":"2019-10-29T02:06:25.000Z","size":1258,"stargazers_count":211,"open_issues_count":3,"forks_count":56,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-08-04T02:10:00.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joexi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-01T10:31:32.000Z","updated_at":"2024-06-13T17:22:50.000Z","dependencies_parsed_at":"2022-09-15T05:40:45.063Z","dependency_job_id":null,"html_url":"https://github.com/joexi/Excel4Unity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joexi%2FExcel4Unity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joexi%2FExcel4Unity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joexi%2FExcel4Unity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joexi%2FExcel4Unity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joexi","download_url":"https://codeload.github.com/joexi/Excel4Unity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224702184,"owners_count":17355510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:25.878Z","updated_at":"2024-11-14T22:30:33.040Z","avatar_url":"https://github.com/joexi.png","language":"C#","readme":"# Excel4Unity\nExcel for Unity\n\n\n## Provides\n\n* Excel(.xlsx) Read/Write\n* Format Excel sheet into custom object (Excel,ExcelTable...)\n* Edit .xlsx file in Unity EditorWindow\n* Generate .cs model according to .xls\n* Conver .xlsx file to JSON format\n\n## How to use\n#### read \u0026 write\n``` c#\nstring excelPath = Application.dataPath + \"/Test/Test.xlsx\";\nstring outputPath = Application.dataPath + \"/Test/Test2.xlsx\";\nExcel xls = ExcelHelper.LoadExcel(excelPath);\nxls.ShowLog();\n\nxls.Tables[0].SetValue(1, 1, \"???\");\nExcelHelper.SaveExcel(xls, outputPath);\n```\n#### generate .cs file\n``` c#\nstring path = Application.dataPath + \"/Test/Test4.xlsx\";\nExcel xls =  ExcelHelper.LoadExcel(path);\nExcelDeserializer ed = new ExcelDeserializer();\ned.FieldNameLine = 1;\ned.FieldTypeLine = 2;\ned.FieldValueLine = 3;\ned.IgnoreSymbol = \"#\";\ned.ModelPath = Application.dataPath + \"/Editor/Excel4Unity/DataItem.txt\";\ned.GenerateCS(xls.Tables[0]);\n```\n#### convert to json\n``` c#\nObject[] objs = Selection.objects;\nfor (int i = 0; i \u003c objs.Length; i++)\n{\n    string path = AssetDatabase.GetAssetPath(objs[i]);\n    if (path.EndsWith(\".xlsx\"))\n    {\n        Excel4Unity.ParseFile(path);\n    }\n    else\n    {\n        EditorUtility.DisplayDialog(\"提示\", \"暂不支持的文件格式\" + path, \"ok\");\n        return;\n    }\n}\nAssetDatabase.Refresh();\n```\n## Dependency\n\n* EEPlus\n* .Net 2.0 instead of .Net 2.0 Subset if you want to do excel job runtime\n\n## Version\n\nUnity 4.x or higher\n\n","funding_links":[],"categories":["C#","Excel"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoexi%2FExcel4Unity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoexi%2FExcel4Unity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoexi%2FExcel4Unity/lists"}