Windows下 Unity 读写Excel (打包exe可用)

大家好,我是小bo,最近用unity写了一个读写execl的小工具,这里记录下来,帮助大家少进坑。
首先列举一下参考博文:
https://blog.youkuaiyun.com/yupu56/article/details/50580277
https://blog.youkuaiyun.com/luoyikun/article/details/81012065
http://www.xuanyusong.com/archives/2429

所需库(可在参考博文中下载):
这里写图片描述

备注:
1.你的unity版本是多少,去对应的安装目录中取dll
2.System.Data.dll 在D:\Program Files\Unity2017.2\Editor\Data\Mono\lib\mono\2.0
3.I18N开头的dll 在 D:\Program Files\Unity2017.2\Editor\Data\Mono\lib\mono\unity

读写代码:

void ReadExcel()
    {
        FileStream stream = File.Open (Application.dataPath + "/Test.xlsx", FileMode.Open, FileAccess.Read);
        IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader (stream);
        do{
            // sheet name
            Debug.Log(excelReader.Name);
           
评论 12
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值