资源简介
Unity Excel xlsx xls
代码片段和文件信息
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Data;
using System.IO;
using Excel;
public class DoExcel {
public static DataSet ReadExcel(string path)
{
FileStream stream = File.Open(path FileMode.Open FileAccess.Read FileShare.Read);
IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenxmlReader(stream);
DataSet result = excelReader.AsDataSet();
excelReader.Close();
return result;
}
public static List Load(string path)
{
List _data = new List();
DataSet resultds = ReadExcel(path);
int column = resultds.Tables[0].Columns.Count;
int row = resultds.Tables[0].Rows.Count;
Debug.LogWarning(column + “ “ + row);
for(int i=1;i
{
DepenceTableData temp_data;
temp_data.instruct = resultds.Tables[0].Rows[i][0].ToString();
temp_data.word = resultds.Tables[0].Rows[i][1].ToString();
Debug.Log(temp_data.instruct + “ “ + temp_data.word);
_data.Add(temp_data);
}
return _data;
}
}
public struct DepenceTableData
{
public string word;
public string instruct;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 493 2016-02-24 18:10 ExcelReadWrite\.gitignore
....... 121856 2016-02-24 18:10 ExcelReadWrite\.vs\ExcelReadWrite\v14\.suo
文件 8104 2017-06-08 16:30 ExcelReadWrite\Assembly-CSharp-Editor.csproj
文件 6440 2017-06-08 17:04 ExcelReadWrite\Assembly-CSharp.csproj
文件 17408 2017-06-08 16:57 ExcelReadWrite\Assets\Data\Test2003.xls
..A..H. 174 2017-06-08 16:58 ExcelReadWrite\Assets\Data\Test2003.xls.me
文件 8600 2017-06-08 16:39 ExcelReadWrite\Assets\Data\Test2007.xlsx
..A..H. 174 2017-06-08 16:32 ExcelReadWrite\Assets\Data\Test2007.xlsx.me
..A..H. 191 2017-06-08 16:10 ExcelReadWrite\Assets\Data.me
I.A.... 24856 2017-06-08 16:38 ExcelReadWrite\Assets\main.unity
..A..H. 174 2017-06-08 14:36 ExcelReadWrite\Assets\main.unity.me
....... 1068032 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins\EPPlus.dll
.....H. 467 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins\EPPlus.dll.me
....... 68608 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins\Excel.dll
.....H. 467 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins\Excel.dll.me
文件 680448 2015-10-20 17:45 ExcelReadWrite\Assets\Plugins\I18N.CJK.dll
..A..H. 486 2017-06-08 16:50 ExcelReadWrite\Assets\Plugins\I18N.CJK.dll.me
文件 31744 2015-10-20 17:45 ExcelReadWrite\Assets\Plugins\I18N.dll
..A..H. 486 2017-06-08 16:50 ExcelReadWrite\Assets\Plugins\I18N.dll.me
文件 32256 2015-10-20 17:45 ExcelReadWrite\Assets\Plugins\I18N.Other.dll
..A..H. 486 2017-06-08 16:50 ExcelReadWrite\Assets\Plugins\I18N.Other.dll.me
文件 171008 2015-10-20 17:45 ExcelReadWrite\Assets\Plugins\I18N.Rare.dll
..A..H. 486 2017-06-08 16:50 ExcelReadWrite\Assets\Plugins\I18N.Rare.dll.me
文件 65536 2013-03-12 23:55 ExcelReadWrite\Assets\Plugins\I18N.West.dll
..A..H. 486 2017-06-08 16:50 ExcelReadWrite\Assets\Plugins\I18N.West.dll.me
....... 192512 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins\ICSharpCode.SharpZipLib.dll
.....H. 467 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins\ICSharpCode.SharpZipLib.dll.me
....... 856064 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins\System.Data.dll
.....H. 467 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins\System.Data.dll.me
.....H. 191 2016-02-24 18:10 ExcelReadWrite\Assets\Plugins.me
............此处省略1128个文件信息
相关资源
- Unity3D插件 Paint in 3D可用于船体涂装仿
- Hierarchy PRO Presets And Selections v2.2新版
- Unity 2017 Game Optimization 新版
- 四级词汇excel表格关联排序法
- 数据库与excel导入导出(JDBCmyeclipse)
- HololensSocketDemo.rar
- UnityChan2D素材包.unitypackage
- 滚珠丝杠、步进电机的扭矩值及轴承
- Unity无限滑动列表插件EnhancedScroller
- I2 Localization unity 国际化插件
- unity3D网络五子棋
- 2013年-2018年中国统计年鉴excel版.zip
- Unity3D海面效果不错的学习资料
- Highlighting System 高亮插件.unitypackage
- unityWebgl文件选择.unitypackage
- Unity3D Glow Effect 自发光 颜色溢出效果
- Unity studio
- Unity AI Behavior Designe_1.6 官网最新版本
- Excel图表模板共计232份.rar
- Unity3d雨水特效资源包
- Unity3D画笔 涂鸦 签字
- Book Page Curl Pro.unitypackage
- unity 魔法效果闪电粒子包
- ETC电子发票台账.rar
- Cinemachine.rar
- Unity环境镜面效果
- Behavior Designer 1.6.4.zip
- CIS_Docker_Community_Edition_Benchmark_v1.1.0.
- Qt中嵌入Excel
- word excel ppt 全套操作教程,完整教程
评论
共有 条评论