codeice / linqtoexcel

Automatically exported from code.google.com/p/linqtoexcel
0 stars 0 forks source link

Mixed numbers and text in excel column retrieves blank values #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
With a an excel column of mixed text and numbers having a column formatting of 
"General" e.g.

ColumnName
-------------
12345622
38393933
ABC29839

When reading from the excel file, the "ABC29839" value is retrieved as a blank. 
I'm assuming that it's due to the confusion between having text and numbers in 
the same column and having the column format set to "General". Setting the 
column format to "Text", resolves the issue. Would it be possible (perhaps as 
part of the mapping) to either explicitly set the type of each column we are 
reading from the excel file, or to just have a general rule that when a mixed 
type column is detected that the default should be to treat the column as text?

What version of the product are you using? On what operating system?
1.7.1 x32 on Windows 7 64 Bit

Original issue reported on code.google.com by aco...@gmail.com on 20 May 2013 at 7:14

GoogleCodeExporter commented 8 years ago
Unfortunately this is a limitation of the OLEDB connection to Excel, so it's 
not possible to explicitly set the type of each column through LinqToExcel. It 
will need to be done in Excel itself.

Original comment by paulyo...@gmail.com on 20 May 2013 at 8:13

GoogleCodeExporter commented 8 years ago
Appreciate your fast response! At least I know now...

Original comment by aco...@gmail.com on 20 May 2013 at 8:21