SheetOpenTableByDefinedName Method |
Namespace: Aceoffix.ExcelReader
Aceoffix.ExcelReader.Workbook wb = new Aceoffix.ExcelReader.Workbook(); Aceoffix.ExcelReader.Sheet sheet1 = wb.OpenSheet("sheet1"); //Get the data of a table Aceoffix.ExcelReader.Table table1 = sheet1.OpenTableByDefinedName("SalesInfo"); while (!table1.EOF) { string strValues = ""; if (!table1.DataFields.IsEmpty) { for (int i = 0; i < table1.DataFields.Count; i++) strValues = strValues + table1.DataFields[i].Value + " "; // Output the data to the current page. Typically, you can save them to the database. Response.Write(strValues + "<br>\r\n"); } table1.NextRow(); } table1.Close(); Response.Write("table1.RowCount = " + table1.RowCount.ToString()); wb.ShowPage(800, 600); // Pop up a HTML dialog to show the data of table. wb.Close();