SheetOpenTable Method |
Namespace: Aceoffix.ExcelReader
The A1-style notation is defined in Microsoft Excel. For example: A1:F8, it means a range of cells A1 through F8. The A1 cell is the cell whose row index is 1 and column index is 1. The F8 cell is the cell whose row index is 8 and column index is 6.
![]() |
---|
Note: There is a limit that the maximum number of columns per worksheet is 676 and the maximum number of rows is 65,536 in Excel2003 and earlier versions. Please do not exceed the maximum number of columns when input the parameter of RangeAddress. |
Aceoffix.ExcelReader.Workbook wb = new Aceoffix.ExcelReader.Workbook(); Aceoffix.ExcelReader.Sheet sheet1 = wb.OpenSheet("sheet1"); string strCompanyName = sheet1.OpenCell("CompanyName").Value; //Get the data of a cell Aceoffix.ExcelReader.Table table1 = sheet1.OpenTable("B5:F16"); //Get the data of a table 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();