02-29-2008, 04:20 PM
(This post was last modified: 02-29-2008, 04:23 PM by ConstantChange.)
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.
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