Connecting Tech Pros Worldwide Forums | Help | Site Map

Excel Reading

Newbie
 
Join Date: Oct 2009
Posts: 3
#1: 4 Weeks Ago
Hi,

I am having one issue regarding excel sheet reading. The columns which is of the format of "Number" are unreadable by OleDB Extended properties 8.0 . I used IMEX =1 as well but no success . I dont want user to change excle sheet format and just directly upload the file to the system.

Can anyone help me in this regard as soon as possible

Thanks

syed

Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#2: 4 Weeks Ago

re: Excel Reading


What do you mean "unreadable"? I don't think I've ever seen an unreadable column before?
Newbie
 
Join Date: Oct 2009
Posts: 3
#3: 4 Weeks Ago

re: Excel Reading


I mean i cannot read mix data type columns from excel sheet using c#
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#4: 4 Weeks Ago

re: Excel Reading


That STILL does not tell me anything.
Does your program throw exceptions?
Does it return a null data type?
Does it return an empty string?
Just saying "It doesn't work" is a pretty big waste of everyone's time
Newbie
 
Join Date: Oct 2009
Posts: 3
#5: 2 Weeks Ago

re: Excel Reading


hi plater,

my program is returning NULL data when excel sheet has mix type of data.
I used IMEX =1 as well but didn't work for me ,same NULL data is returning when i read the excel sheet.
I hope you understrand
Plater's Avatar
Moderator
 
Join Date: Apr 2007
Location: New England
Posts: 7,161
#6: 2 Weeks Ago

re: Excel Reading


Not sure what to tell you.
The only thing close to your issue that I have seen is that in mixed column types, if the "numbers" are at the top, the string columns show up as an empty string. The easiest way around that is to ensure there is a text string at the top. (If you have column headers, consider setting HDR=0 to force the headers as data and thus all columns of string type)
Reply