Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please help - how can I determine if a column exists?
#4
Solved: 10 Years, 9 Months, 2 Weeks ago
Thanks Ankur and Hi new qtp!

Ankur, good solution, Thanks! Why I did not think of that? - I dont know. Me being upset comes in my own way it seems. I was hoping that there was a "proper" solution that does not have a workaround smell..

Cheers!

ps.: Btw, this is the solution I implemented yesterday, but potentially I will switch to your solution because I dont like on error resume.

Code:
set col=nothing
On error resume next
set col=sheet.getParameter(columnName)
On error goto 0
if(col is nothing) then    'column did not exist
        sheet.addParameter columnName, valueToPut
else   'column did exist
        DataTable.Value(columnName, sheetName)=valueToPut
end if
Reply


Messages In This Thread
RE: Please help - how can I determine if a column exists? - by ConstantChange - 02-29-2008, 04:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  to count the number of used rows in a particular column sujaravi123 3 10,944 06-12-2013, 03:17 PM
Last Post: sujaravi123
  How to recognize table row and column siwani 4 4,838 04-05-2012, 05:06 PM
Last Post: verma.vik6
  text exists or not sujaravi123 3 5,060 11-09-2011, 11:57 PM
Last Post: as_srini
  Reading xls by column name anbarasu 2 3,073 04-05-2010, 12:26 PM
Last Post: Saket
  how to check if selection in menu exists.. Anil Kumar 1 3,327 10-15-2009, 08:45 PM
Last Post: jsknight1969

Forum Jump:


Users browsing this thread: 1 Guest(s)