Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getcelldata and Setcelldata
#1
Hi.....all
How to retrieve the values by using the Getcelldata and setcelldata.is it only applicable for Web based application .Then how to use this.I tried with yahoo.
Is tis one correct and what is the actuall use of doing this...

Code:
Dim i,j For i=1 to Row count For j=1 to column count msgbox browser("Yahoo! Mail: The best").Page("Yahoo! Mail: The best").WebTable("Yahoo! ID:").GetCellData (i,j) Next Next

Pls anyone answer me.............
Reply
#2
Hi all,
**********getting the rowcount**********
Code:
var=SAPGuiSession("Session").SAPGuiWindow("Create Sales Order: Initial").SAPGuiTable("Distribution Channel").rowcount msgbox var
*********Getting the cell data for the particular row and column*********
Code:
SAPGuiSession("Session").SAPGuiWindow("Create Sales Order: Initial").SAPGuiTable("Distribution Channel").getcelldata(1,"Material") 1 is row number Material is columnname of the GuiTable
Reply
#3
Hi rajeshdizzy ,
i think you know the use with getcell data and setcelldata.

You can use the following code. For better understanding purpose please use one column and get all data from all the rows based on the column and then move to another column.
'One more thing is we should specify the row number while getting the column count.
'--------------------------------------------------------------------------------------
Code:
For i= 1 to Browser("SAM").Page("SAM").WebTable("Database:").ColumnCount(1) For j = 1 to Browser("SAM").Page("SAM").WebTable("Database:").RowCount Msgbox "Data from Column # " & i & ",Row # " & j &" is ''"& Browser("SAM").Page("SAM").WebTable("Database:").GetCellData(j,i) & "''." Next Next
'--------------------------------------------------------------------------------------
Let me know if you need any more info.
Thanks,
SUpputuri
Reply
#4
Hi...King....
i cannot understand anything.....explain with an example of any website like yahoo or gmail.............and want 2 know wat is the use of doin this and wat to check?
Reply
#5
Hi dizzy,

see the example below,

for getting the rowcount for the webtable,SAPGuiTable etc., ,use rowcount method.

Code:
var=SAPGuiSession("Session").SAPGuiWindow("Create Sales Order: Initial").SAPGuiTable("Sales Order").rowcount msgbox var here getting how many rows present in the GuiTable for i=1 to var var1=SAPGuiSession("Session").SAPGuiWindow("Create Sales Order: Initial").SAPGuiTable("Sales Order").GetCellData(i,"Material") msgbox var1 next

here we can get the cell data upto the loop will exit.

for set the cell data in the SAPGuiTable

Code:
SAPGuiSession("Session").SAPGuiWindow("Create Sales Order: Initial").SAPGuiTable("Sales Order").SetCellData 1,"Material","100"

1 is row name
"Material" is column
"100" is data

here i have explained for SAP application ,this script same for web application also.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Using SAPGuiTable).SetCellData to Active cell. rhozeski 2 3,162 02-10-2020, 10:44 PM
Last Post: rhozeski
  SetCellData issue with JavaTable shashidtj 2 3,379 09-27-2017, 12:55 AM
Last Post: shashidtj
  Webtable().GetCellData() Returns hidden values of Cells ssvali 4 6,871 06-07-2013, 08:37 PM
Last Post: kawsar
  QTP - Webtable().GetCellData() returns unknown symbols and spaces lokesh8008 2 5,364 05-10-2013, 03:49 AM
Last Post: sria123
  GetCellData syntax jason77 1 15,247 05-12-2009, 12:00 PM
Last Post: manojith1984

Forum Jump:


Users browsing this thread: 1 Guest(s)