Reading data from a spreadsheet

Hi all,


I need to be able to read only the rows from a worksheet that have data in, and for each row with data I need to read each cell that has data.

I don’t know before hand how many rows and columns have data, so need a way to work this out so I don’t end up reading blank rows and columns.

Thanks
Hi,

I think you may try:

Workbook workbook = new Workbook("e:\\test2\\AccessSequency.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
Cells cells = worksheet.Cells;
//Browse all the initialized cells in the sheet.
foreach (Aspose.Cells.Cell cell in cells)
{
if (cell.Value != null)
{
MessageBox.Show(cell.Name);
MessageBox.Show(cell.Value.ToString());
}
}