Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
datatable column exist
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Use the code below,

Code:
Dim paramcount, FindParameter

datatable.ImportSheet "C:\Documents and Settings\Administrator\Desktop\excelblank.xls",1,"Action1"
paramcount=datatable.GetSheet("Action1").GetParameterCount
msgbox paramcount
For i=1 to paramcount
    If  datatable.GetSheet("Action1").GetParameter(i).Name = "Password" Then
        datatable.Value(i,"Action1")="mypassword"
        FindParameter = "Pass"
    End If
Next
If FindParameter <> "Pass" Then
    datatable.GetSheet("Action1").AddParameter "Password","mypassword"
End If

Hope it helps.

Let me know in case if you need any help.

I will post the code for doing it in excel tomorrow.

Thanks,
Elango
Reply


Messages In This Thread
datatable column exist - by diya - 12-10-2012, 09:20 PM
RE: datatable column exist - by elango87 - 12-10-2012, 10:09 PM
RE: datatable column exist - by diya - 12-10-2012, 10:19 PM
RE: datatable column exist - by elango87 - 12-11-2012, 11:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Exist and Visible Are True When Objects Aren't There - Is there A Better Way? zunebuggy 3 3,146 04-24-2018, 02:12 PM
Last Post: Ankur
  Time Delay issue with Exist mv8167 11 24,814 06-19-2017, 02:56 PM
Last Post: grosorg
  [UFT] Get column name from SfwObject felino 0 3,023 12-02-2015, 04:07 PM
Last Post: felino
  AddParameter method does not add in first column of datatable alpha1 4 5,584 07-14-2015, 12:44 AM
Last Post: supputuri
  Performance Issues Using '.Exist' AndyBSG 2 3,501 12-12-2014, 03:24 PM
Last Post: AndyBSG

Forum Jump:


Users browsing this thread: 1 Guest(s)