I am trying to read an excel file of size 263 KB, it includes 3 columns and 6998 rows of data, the first column is alphanumeric id Site ID
ex: 'D7302', and the other 2 columns are latitude
and longitude
of type decimal,
try
{
dataTable = worksheet.Cells.ExportDataTable(HeaderLineStartingRowNumber, 0, worksheet.Cells.MaxRow - HeaderLineStartingRowNumber + 1, worksheet.Cells.MaxColumn + 1, true);
}
catch (CellsException)
{
dataTable = worksheet.Cells.ExportDataTableAsString(HeaderLineStartingRowNumber, 0, worksheet.Cells.MaxRow - HeaderLineStartingRowNumber + 1, worksheet.Cells.MaxColumn + 1, true);
}
this code always throws CellsException
and exports data as string which truncates decimals and returns a string so instead of 28.125027778
it returns 28
, when i reduced the file size to 100 rows it was exported successfully as expected so it must be a size issue, so are there size limitations for ExportDataTable
, Thank you