示例#1
0
        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;
        }
示例#2
0
        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++;
            }
        }
示例#3
0
 public Worksheet(FastExcel fastExcel)
 {
     FastExcel = fastExcel;
 }