Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read column name of DataTable
#1
Solved: 11 Years, 4 Months ago
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.
Reply
#2
Solved: 11 Years, 4 Months ago
I can help, but am finding it difficult to understand your question, try explaining once again.
Reply
#3
Solved: 11 Years, 4 Months ago
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)-:
Reply
#4
Solved: 11 Years, 4 Months ago
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.
Reply
#5
Solved: 11 Years, 4 Months ago
No I did not try it. But now, I did change the way how to do it.
Thanks again for your help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Want to read the data from excel and set read value in the JavaTable rajeevk7 0 2,309 07-10-2017, 04:20 PM
Last Post: rajeevk7
  [UFT] Get column name from SfwObject felino 0 3,013 12-02-2015, 04:07 PM
Last Post: felino
  AddParameter method does not add in first column of datatable alpha1 4 5,574 07-14-2015, 12:44 AM
Last Post: supputuri
  Unable to right click column header sudhirzpatil 4 6,382 07-18-2013, 09:42 PM
Last Post: sudhirzpatil
  datatable column exist diya 3 12,532 12-11-2012, 11:24 AM
Last Post: elango87

Forum Jump:


Users browsing this thread: 1 Guest(s)