Posts: 6
Threads: 2
Joined: Mar 2008
Reputation:
0
03-18-2008, 01:41 AM
Hi,
I want to be able to read any column's name into a DataTable.
I open many Excel files and each one of them has different contents - different number of columns and different column name's.
Can you help ?
Thanks.
Posts: 26
Threads: 0
Joined: Mar 2008
Reputation:
0
03-19-2008, 04:01 PM
I can help, but am finding it difficult to understand your question, try explaining once again.
Posts: 6
Threads: 2
Joined: Mar 2008
Reputation:
0
03-19-2008, 08:25 PM
Lets make it simple: I want to know the column's name (header) in the data table.
I open an Excel file and I want to know what are the column's headers it contains.
If I have one Excel file, I will be able to read it. The problem is I many different files. Each one has different fields.
One more thing, it's feasible using the Excel object. Unfortunately, I can't use it because the client doesn't have Excel installed (and doesn't want to install it)-:
Posts: 26
Threads: 0
Joined: Mar 2008
Reputation:
0
03-21-2008, 09:30 PM
I couldn't find a direct method.But, Have you thought about using an insanely large number as you max loop count and retrieving the cell data one by one? The loopcounter should be more than the number of coulmns in the excel sheet with the maximum number of columns.
Posts: 6
Threads: 2
Joined: Mar 2008
Reputation:
0
03-25-2008, 07:03 PM
No I did not try it. But now, I did change the way how to do it.
Thanks again for your help.