Notifications
Article
How to use the plug-in ExcelTools tool - EN
Updated 9 months ago
64
0
如何使用ExcelTools插件
界面布局分2块
he interface layout is divided into 2 blocks



Open是主界面的入口
Open is the entrance to the main interface,Config is the entrance to the configuration interface
如何使用配置界面
How to use the configuration interface







Excel Path是Excel存放的地址,如果没有设置这个地址,Open界面将不会显示任何东西
Excel Path:The address is stored by the Excel, and if this address is not set, the Open interface will not display anything
OutputDataPath 是导出xml或者csv数据的地址
OutputDataPath : Is the address that exports XML or CSV data
OutputClassPath 是导出类的地址
OutputClassPath : Is the address of the export class
Filter Excel Postfix 由于Excel有很多的后缀,这里会过滤掉没有选中的后缀的文件
Filter Excel Postfix, Since Excel has a lot of suffixes, it will filter out the unselected suffix.
Codeing 编码格式,导出文件的编码格式
Codeing, Encoding format to export the encoding format of a file
最后一个按钮是清除本地的缓存,由于所有的数据记录在本地如果清除后,上面的属性都会丢失
The last button is to clear the local cache, because all the data is recorded locally if it is cleared, the above attributes will be lost.
如何使用主界面
How to use the main interface









当你的配置界面中的Excel Path指定到含有Excel的目录下时,这里会把Excel里面的表读取出来显示到这里
When the Excel Path in your configuration interface is assigned to a directory containing Excel, it will read the table in the Excel and display it here






这是我的Excel文件,表名叫Level
This is my Excel file, which is called Level
Excel制作的规则
Rules made by Excel
再来说说Excel制作的规则
Talk about the rules of Excel production
第1行 是Key 值 比如 id , name , enemy 1 等
The first line is the Key value, such as ID, name, enemy 1, etc.
第2行 是注释 介绍这个key值表达含义
The second line is the annotation that introduces the meaning of the key value
第3行 是类型,方便生成类的时候,可以得到对应类型
The third line is type, and when it is convenient to generate the class, you can get the corresponding type
上面3行是必须有的,不然报错,或则数据会不对
The above 3 lines must have, otherwise the error, or the data will not
3行下面才是真正的数据
The 3 lines are the real data
Excel的显示



这里会显示出来
It will be shown here.
Excel的导出
The export of Excel
ExportType 是导出的类型 有2种格式 xml和csv
ExportType is the type of export that has 2 formats, XML and CSV
当你选中Level时
When you select Level



界面变成了这样
The interface becomes so
这里让你设置导出数据的名字 outputDataName
Here, let you set the name of the exported data, outputDataName
导出表的类名 tableClassName
The class name tableClassName of the export table
导出单行数据的类名 dataClassName
Export the class name dataClassName of the single line data
当你设置好之后点击Create
When you set it up, click Create



在你设置好的导出路径下会看到
You'll see it in your set export path



数据导出了
The data is exported
静态 Excel数据表使用
Static Excel data table use
最后我要看看如何在实战中使用生成的静态数据表
Finally, I want to see how to use the generated static data table in real combat
首先我们的插件给我们提供了3个基础的类,这3个类包含的如何解析xml和如何解析csv
First of all, our plug-in provides 3 basic classes, and the 3 classes contain how to parse XML and how to parse CSV
就是这3个
These are the 3 Class




针对于每个项目所存的路径不尽相同,所以第一件事我们需要进入到TableBase里
There are different paths for each project, so the first thing we need is to get into the TableBase




把这个路径设置到我们的数据所在的路径
Set this path to the path of our data



就是这个路径
This is the path
Ok完成了这步之后,新建一个脚本例如TestData
After Ok finished this step, a new script was built, such as TestData





如果你导出的是csv就用第一个方法
If you export CSV, use the first method
如果你导出的是xml就用第二个方法
If you export XML, use second methods
Ok数据加载完成
Ok data loading completion
你想获取其中一条数据的这样调用
You want to get such a call from one of the data




大功告成
Be accomplished

王韬
2
Comments