91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 48KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-12
  • 語言: 其他
  • 標(biāo)簽: uinty??表格??存取??

資源簡(jiǎn)介

unity中動(dòng)態(tài)來生成表格文件并寫入數(shù)據(jù)到表格中,unity中動(dòng)態(tài)來生成表格文件并寫入數(shù)據(jù)到表格中

資源截圖

代碼片段和文件信息

using?UnityEngine;??
using?System.Collections;??
using?org.in2bits.MyXls;??
using?System.Collections.Generic;??
public?class?TestInfo??
{??
????public?string?name;??
????public?string?id;??
????public?string?num;??
};??
public?class?ExcelMakerManager??{??
??
????public?static?ExcelMakerManager?eInstance;??
????public?static?ExcelMakerManager?CreateExcelMakerManager()???
????{??
????????if(eInstance==null)??
????????{??
????????????eInstance?=?new?ExcelMakerManager();??
????????}??
????????return?eInstance;??
????}??
????//鏈表為?物體信息?.??
????public?void?ExcelMaker(string?name?List?listInfo)??
????{??
????????XlsDocument?xls?=?new?XlsDocument();//新建一個(gè)xls文檔??
????????xls.FileName?=?name;//?@“D:\tests.xls“;//設(shè)定文件名??
??
????????//Add?some?metadata?(visible?from?Excel?under?File?->?Properties)??
????????xls.SummaryInformation.Author?=?“xyy“;?//填加xls文件作者信息??
????????xls.SummaryInformation.Subject?=?“test“;//填加文件主題信息??
??
????????string?sheetName?=?“Sheet0“;??
????????Worksheet?sheet?=?xls.Workbook.Worksheets.AddNamed(sheetName);//填加名為“chc?實(shí)例“的sheet頁??
????????Cells?cells?=?sheet.Cells;//Cells實(shí)例是sheet頁中單元格(cell)集合??
??
????????int?rowNum?=?listInfo.Count;??
????????int?rowMin?=?1;??
????????int?row?=?0;??
??
????????for?(int?x?=?0;?x?????????{??
????????????if?(x?==?0)??
????????????{??
????????????????//根據(jù)具體的物體信息?.需要重新寫??
????????????????cells.Add(1?1?“名字“);??
????????????????cells.Add(1?2?“ID“);??
????????????????cells.Add(1?3?“數(shù)量“);??
????????????}??
????????????else??
????????????{??
????????????????cells.Add(rowMin?+?x?1?listInfo[row].id);??
????????????????cells.Add(rowMin?+?x?2?listInfo[row].name);??
????????????????cells.Add(rowMin?+?x?3?listInfo[row].num);??
????????????????row++;??
????????????}??
????????}??
????????xls.Save();??
????}??
}??

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????1960??2018-07-05?15:28??Unity3d動(dòng)態(tài)創(chuàng)建excel以及寫入數(shù)據(jù)\ExcelMakerManager.cs

?????文件?????125952??2010-01-27?12:38??Unity3d動(dòng)態(tài)創(chuàng)建excel以及寫入數(shù)據(jù)\org.in2bits.MyXls.dll

?????文件???????1827??2018-07-05?15:27??Unity3d動(dòng)態(tài)創(chuàng)建excel以及寫入數(shù)據(jù)\test.cs

?????目錄??????????0??2018-07-05?15:28??Unity3d動(dòng)態(tài)創(chuàng)建excel以及寫入數(shù)據(jù)

-----------?---------??----------?-----??----

???????????????129739????????????????????4


評(píng)論

共有 條評(píng)論

相關(guān)資源