how to add data into excel sheet using winrunner.
thanks in advance.
I mean how to write data into excel sheet using winrunner
Go into the TSL online help and look at the ddt_* functions
They will work you through how to create, open, add, and step through excel files.
Insanity: doing the same thing over and over again and expecting different results
Or look at the "db_*" functions.
i tried with this its not inserting data.
table = "c:\\Temp\\default1.xls";
ddt_set_val_by_row ( "c:\\Temp\\default1.xls",0, "January",int(rand()*100) );
whats wrong with this.I could not insert data into excel.
i have column name "january" where i have to put rand value.
thanks in advance.
please help this out
good grief....Let me guess -
You are trying to do the following:
Create a number of column in excel (either 5 or 12)
The first row in it should have random numbers between 1 and 100 in all columns.
Similarly the 3rd row should also have random numbers between 1 and 100 in all columns
The 2nd row will contain value which is sum of 1st row and 3rd row.
Each random number should be unique.
<font size="2" face="Verdana, Arial, Helvetica">Am I right? I can almost bet I am as this is the third time in a a little over a week we have seen this scenario.
Just admit now that you are trying to have us do your homework for you and back out of the thread before I have to lock it.
no i am not.This is not a homework.i was trying with rand thats it.
Curious then why the same question keeps popping up with the very same parameters.
I'll give you the benefit of the doubt slightly, and give you this to look at.
Look at the return code you are getting with the set val function. There isn't a 0 row.
Look at the relevant TSL help again and include reading up on the "save" part.
open the winrunner choose record option form that
u just open the excel put the data
using loop for adding different data..(i think for loop is good one adding repeation of data)