I just discovered this amazing framework, and I encountered a problem while reading data from excel.
Everything is great except one column is returned empty.
It's the first column I am talking about (the last as well, but it's the same problem)
and here is the excel sheet:
I believe it has something to do with the formatting (Numbers and special characters), because it's the only difference the columns have.
But I have found nothing while googling.
Just in case, here is the code I use:
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(filePath.Text);
Worksheet sheet = workbook.Worksheets[0];
DataTable dataTable = sheet.ExportDataTable();
DataView view = new DataView(dataTable);
dataGrid.ItemsSource = view;
dataGrid.AutoGenerateColumns = true;
Thanks for your time,