• Stars
    star
    203
  • Rank 192,890 (Top 4 %)
  • Language
    C#
  • Created almost 9 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Excel for Unity. Provides both read and write with .xls and .xlsx

Excel4Unity

Excel for Unity

Provides

  • Excel(.xlsx) Read/Write
  • Format Excel sheet into custom object (Excel,ExcelTable...)
  • Edit .xlsx file in Unity EditorWindow
  • Generate .cs model according to .xls
  • Conver .xlsx file to JSON format

How to use

read & write

string excelPath = Application.dataPath + "/Test/Test.xlsx";
string outputPath = Application.dataPath + "/Test/Test2.xlsx";
Excel xls = ExcelHelper.LoadExcel(excelPath);
xls.ShowLog();

xls.Tables[0].SetValue(1, 1, "???");
ExcelHelper.SaveExcel(xls, outputPath);

generate .cs file

string path = Application.dataPath + "/Test/Test4.xlsx";
Excel xls =  ExcelHelper.LoadExcel(path);
ExcelDeserializer ed = new ExcelDeserializer();
ed.FieldNameLine = 1;
ed.FieldTypeLine = 2;
ed.FieldValueLine = 3;
ed.IgnoreSymbol = "#";
ed.ModelPath = Application.dataPath + "/Editor/Excel4Unity/DataItem.txt";
ed.GenerateCS(xls.Tables[0]);

convert to json

Object[] objs = Selection.objects;
for (int i = 0; i < objs.Length; i++)
{
    string path = AssetDatabase.GetAssetPath(objs[i]);
    if (path.EndsWith(".xlsx"))
    {
        Excel4Unity.ParseFile(path);
    }
    else
    {
        EditorUtility.DisplayDialog("提示", "暂不支持的文件格式" + path, "ok");
        return;
    }
}
AssetDatabase.Refresh();

Dependency

  • EEPlus
  • .Net 2.0 instead of .Net 2.0 Subset if you want to do excel job runtime

Version

Unity 4.x or higher

More Repositories

1

BackgroundRunner

Helping iOS Application to running in background
Objective-C
36
star
2

OCGeneric

Basis Generic Support in Objective-C.
Objective-C
35
star
3

iBlackList

a blacklist in iphone without jailbreak
Objective-C
24
star
4

FileManager

A local file manager helping reading and writing datas
Objective-C
14
star
5

ThreadSafeObject

a simple class helping using un-thread-safe class in a safe way
Objective-C
10
star
6

SignedDistanceFunctions

7
star
7

EZSpritePacker

Simple Sprite Packer for Unity(NGUI/UGUI)
C#
6
star
8

AutoKey

怀旧服魔兽助手
C#
6
star
9

CCTableLayer

A TableView in Cocos2D use as UITableView
Objective-C
4
star
10

U3Database

A Unity3D/C# wrapper around SQLite
C#
3
star
11

UnityDebugger

Lite tool helping check runtime status of unity application in Editor
3
star
12

16bitImageConverter

Objective-C
3
star
13

JCoder

Serialize object into local and deserialize local data into object
Objective-C
3
star
14

Generic-in-Objective-C-

Generic-in-Objective-C
2
star
15

GreenMyGitHub

Make the Contributions green
Shell
2
star
16

JXTextureManager

Manager for texture async loading
Objective-C
2
star
17

Pomelo-Unity-Client

Unity-Client for Pomelo
2
star
18

ImageMirror

Image Mirror For UGUI of Unity
C#
2
star
19

ErrorDiffusion4Unity

A Editor Script For Error Diffusion In Unity
C#
2
star
20

Release-Tool

Release工具
Objective-C
2
star
21

dylib.io

Objective-C
2
star
22

UnityMobileOptimization

Translate of Unity documentation "PlatformSpecific/Mobile Developer Checklist/Optimization"
2
star
23

MagnifierView

A MagnifierView support both UIKit and Cocos2D
Objective-C
2
star
24

TexturePacker4Unity

Using Texture Packer In Unity Editor
Objective-C
1
star
25

UIFillSlicedImage

Unity UGUI Component Support Both Filled And Sliced Simultaneously
1
star
26

Unity-Pusher

Helping perform on main thread in unity
C#
1
star
27

UnityAnalyzer

Analyze Resources In Editor
C#
1
star
28

JObjectCoder

write & read object to/from local file
Objective-C
1
star
29

Log4WCL

Tool for WCL Log Analyzing
C#
1
star
30

UnityDocTranslate

1
star
31

HackGuard

Guard the memory hack on mobile device to make the application safe
C#
1
star
32

JXTouchDispatcher

A touch dispather in cocos2D for iphone
Objective-C
1
star
33

NoGCugui

Avoid the unnessary gc when using ugui
C#
1
star
34

IconMaker

make app store icon in different size automatically
1
star
35

UnityMVC

MVC in Unity
C#
1
star
36

EZAsset

Tool for using assetbundle in unity
C#
1
star