Issue 80 in linqtoexcel: Column data types

461 views
Skip to first unread message

linqt...@googlecode.com

unread,
Dec 13, 2012, 6:50:22 AM12/13/12
to linqt...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 80 by CliffKGi...@gmail.com: Column data types
http://code.google.com/p/linqtoexcel/issues/detail?id=80

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



linqt...@googlecode.com

unread,
Dec 13, 2012, 9:55:52 AM12/13/12
to linqt...@googlegroups.com

Comment #1 on issue 80 by paulyo...@gmail.com: Column data types
http://code.google.com/p/linqtoexcel/issues/detail?id=80

Cliff,

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

Thanks,
Paul

linqt...@googlecode.com

unread,
Jan 8, 2013, 3:21:35 PM1/8/13
to linqt...@googlegroups.com

Comment #2 on issue 80 by crvazq...@gmail.com: Column data types
http://code.google.com/p/linqtoexcel/issues/detail?id=80

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.

linqt...@googlecode.com

unread,
Jan 11, 2013, 8:24:08 AM1/11/13
to linqt...@googlegroups.com

Comment #3 on issue 80 by slawomir...@gmail.com: Column data types
http://code.google.com/p/linqtoexcel/issues/detail?id=80

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

linqt...@googlecode.com

unread,
Feb 5, 2013, 10:11:06 AM2/5/13
to linqt...@googlegroups.com
Updates:
Status: Fixed

Comment #4 on issue 80 by paulyo...@gmail.com: Column data types
http://code.google.com/p/linqtoexcel/issues/detail?id=80

I believe Slawomir has the best workaround for this issue: force excel
formatting to text on that column

linqt...@googlecode.com

unread,
May 8, 2013, 9:41:16 AM5/8/13
to linqt...@googlegroups.com

Comment #5 on issue 80 by pstem...@gmail.com: Column data types
http://code.google.com/p/linqtoexcel/issues/detail?id=80

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

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

linqt...@googlecode.com

unread,
May 8, 2013, 10:42:39 AM5/8/13
to linqt...@googlegroups.com

Comment #6 on issue 80 by paulyo...@gmail.com: Column data types
http://code.google.com/p/linqtoexcel/issues/detail?id=80

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.

pste...@gmail.com

unread,
May 8, 2013, 10:48:53 AM5/8/13
to linqt...@googlegroups.com, codesite...@google.com, linqt...@googlecode.com
Understood.  Would it help if we could override the Extended Properties on the connection string?  I know that JET ignores the MaxScanRows value when passed in the connection string, but I heard ACE does support it.  To use it though, we would need to be be able to pass over customized/modified Extended Properties.

Paul

linqt...@googlecode.com

unread,
Jun 28, 2013, 2:45:15 PM6/28/13
to linqt...@googlegroups.com

Comment #7 on issue 80 by pzthe...@gmail.com: Column data types
http://code.google.com/p/linqtoexcel/issues/detail?id=80

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 ?

Florin Adrian Gerlan

unread,
Sep 1, 2020, 5:13:05 AM9/1/20
to Linq To Excel
Microsoft says it can solve the problem by putting "IMEX = 1" in "Extended Properties" of connection to excel file.
Reply all
Reply to author
Forward
0 new messages