By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,718 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,718 IT Pros & Developers. It's quick & easy.

Trouble Reading Column Name in excel File into Dataset, C#

P: 37
Hi,
I am reading excel file and reading values from that
I am using provider As : "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + Filename + ";Extended Properties=\"Excel 8.0;Hdr=No;IMEX=1\"";

EXCEL File

WINDOWS FILE EXEL 2003_______ 23 _______24
File Name : abc.txt______________145______124
File Data : 04/05/2009
Sample Name: xyz
Sample Weight: 23 gm
Sample Description: Dry

Time____Mass_____dm_________Sol 1____Sol 2____Sol 3
0.01____13.8355___138.355______-8910_______0.55______24.87
0.02____14.8355___144.355______-3310_______0.21______33.87


but After reading values into Dataset values look like

DATASET

WINDOWS FILE EXEL 2003_______ 23 _______24
File Name : abc.txt______________145______124
File Data : 04/05/2009
Sample Name: xyz
Sample Weight: 23 gm
Sample Description: Dry

Time____Mass_____dm__________________________Sol 3
0.01____13.8355___138.355______-8910_____0.55______24.87
0.02____14.8355___144.355______-3310_____0.21______33.87
Column Name 'Sol 1' and 'Sol 2' is missing even though it is reading the readings. Just not able to read column names.

I am not sure about what is exact problem. so please help me in solving this.

Thanx in advance.
Apr 6 '09 #1
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
Recheck your configurations, Perhaps you mistyped something somewhere?
Apr 6 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.