codeice / linqtoexcel

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

Column data types #80

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
When reading a column where the first data row is numeric and following rows 
are text fields the text fields are ignored

What is the expected output? What do you see instead?
Would like to see all rows read regardless of datatypes.  In our case above the 
column contains lot numbers, which are sometimes numeric and sometimes alpha 
numeric.  To get around this issue we either have to mark the column as text in 
excel or put a dummy row in fist with a text value.

What version of the product are you using? On what operating system?
1.6.2 on Windows Server 2008r2

Is there a way to set the field datatype as users are not great at formatting 
spreadsheets correctly!???

Cheers
Cliff

Original issue reported on code.google.com by CliffKGi...@gmail.com on 13 Dec 2012 at 11:50

GoogleCodeExporter commented 8 years ago
Cliff,

Can you attach the spreadsheet your're using and also show me the code you're 
using to query the spreadsheet.

Thanks,
Paul

Original comment by paulyo...@gmail.com on 13 Dec 2012 at 2:55

GoogleCodeExporter commented 8 years ago
Hi all, I am having an issue that I need help with. I am importing a CSV file 
with a text column that is supposed to have only numbers, but they can have 
leading zeros. After the data is imported, all the leading zeros are lost. Is 
there any way to specify column formats or a workaround this issue? I really 
appreciate your assistance with this matter.

Original comment by crvazq...@gmail.com on 8 Jan 2013 at 8:21

GoogleCodeExporter commented 8 years ago
Hi,
I have simmilar problem. I have an excel column which has fields with numeric 
and alphanumeric data. I try to map this column to .net string type. Only 
alphanumeric types are retrieved. Numeric data result in null string. One 
workaround is to force excel formating to text on that column. Tested on 1.6.6

best regards
Sławomir

Original comment by slawomir...@gmail.com on 11 Jan 2013 at 1:23

GoogleCodeExporter commented 8 years ago
I believe Slawomir has the best workaround for this issue: force excel 
formatting to text on that column

Original comment by paulyo...@gmail.com on 5 Feb 2013 at 3:10

GoogleCodeExporter commented 8 years ago
So, is there no real "fix" for this?  I can't always guarantee the user will 
format a column to be text.  (I have the same scenario where a column is 
usually numbers, but COULD be text.  I have my object defined as a string, but 
linqtoexcel will ignore the non-numeric values if numeric value rows come 
first.)

Thanks

Original comment by pstem...@gmail.com on 8 May 2013 at 1:40

GoogleCodeExporter commented 8 years ago
Sorry, but there is no real "fix" for it. You will have to talk to Microsoft to 
update their Jet and Ace database engines to fix it.

Original comment by paulyo...@gmail.com on 8 May 2013 at 2:42

GoogleCodeExporter commented 8 years ago
I'm having something similar where most of my values in the column are numeric 
...but 50 rows down, there is a alpha value.  The object thinks it's a null 
value. It's a computed value.  

Any hints ?  

Original comment by pzthe...@gmail.com on 28 Jun 2013 at 6:45