public void Read() { FastExcel.PrepareArchive(); IEnumerable <Row> rows = null; //using (Stream stream = FastExcel.Archive.GetXmlStream(FileName)) //{ XMLNode document = XMLParser.Parse(FastExcel.Archive.GetXmlText(FileName)); int skipRows = 0; XMLNodeList rowList = document.GetNodeList("worksheet>0>sheetData>0>row"); rows = GetRows(rowList); //} Rows = rows; }
public static void DoTest() { string excelFile = EditorUtils.ProjectPath + "Assets/Editor/GameConfig/c场景配置表1.xlsx"; FastExcel fastExcel = new FastExcel(excelFile); var works = fastExcel.Worksheets; Worksheet work = fastExcel.Read(0); int rowIndex = 0; foreach (Row row in work.Rows) { int cellIndex = 0; foreach (Cell cell in row.Cells) { Debug.Log("ceil(" + rowIndex + "," + cellIndex + "):" + cell.Value); cellIndex++; } rowIndex++; } }
public Worksheet(FastExcel fastExcel) { FastExcel = fastExcel; }