Hello,
When importing some of excel files I'm receiving the following error:
"Row number or column number cannot be zero"
My code:
public DataSet ImportData(ExcelImportOptions options)
{
if (options != null && !String.IsNullOrEmpty(options.FilePath))
{
DataSet set = new DataSet();
Workbook book = new Workbook();
book.Open(options.FilePath);
foreach (Worksheet worksheet in book.Worksheets)
{
if (worksheet.Cells.Count > 0)
{
DataTable table = worksheet.Cells.ExportDataTable(0, 0, worksheet.Cells.Rows.Count, worksheet.Cells.Columns.Count, true);
table.TableName = worksheet.Name;
set.Tables.Add(table);
}
}
return set;
}
else return null;
}
It seems like it cannot recognize columns at all. The problematic example excel file is attached.
Any idea what could be the problem?
Regards
Tomasz