【文件属性】:
文件名称:Unity 解析Excel工具:Excel.dll 和 ICSharpCode.SharpZipLib.dll
文件大小:104KB
文件格式:ZIP
更新时间:2022-09-26 15:02:35
Unity Excel C#
Unity 解析Excel所需要用到的工具,解压后直接放到项目中即可。
使用代码:
// 解析Excel
FileStream fs = new FileStream(Application.dataPath + "/Resources/Level/LevelConfig/Level_1001.xlsx", FileMode.Open, FileAccess.Read);
// 创建Excel读取类
IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(fs);
while (excelReader.Read())
{
int testInt = excelReader.GetInt32(0);
string testStr = excelReader.GetString(1);
}
【文件预览】:
Excel.dll
ICSharpCode.SharpZipLib.dll