How to Get data from database(table) to an excel sheet
Answers were Sorted based on User's Feedback
Answer / naga chiranjeevi kota
Session="mysession";
connstring="DSN=DQMCHIRU;UID=dqm5map;pwd=dqm5map;server=Orcl";
rc=db_connect(Session,connstring);
x="select PART_NUM,PART_ORG ,RDX_ID,DESCRIPTION from
reference_data_part where part_num like '%31' order by
PART_NUM";
printf(x);
# Opening the excel sheet
dqmdata = "C:\ExecuteSampleData.xls";
rc = ddt_open(dqmdata, DDT_MODE_READWRITE);
if (rc!= E_OK && rc != E_FILE_OPEN)
pause("Cannot open table.");
dc=db_execute_query(Session,x,rows);
#ddt_get_row_count(dqmdata,rows);
for(i=0;i<rows;i++)
{
db_get_row(Session,i,rowcon);
#ddt_set_row(dqmdata,i);
split(rowcon,rdp,"\t");
for(j=0;j<4;j++)
{
printf("R"&i+1&", C"&j+1&": "&rdp[j+1]);
ddt_set_val_by_row(dqmdata,i+1,"C"&(j+1),rdp[j+1]);
}
}
db_disconnect(Session);
ddt_save(dqmdata);
ddt_close(dqmdata);
answer by: Naga Chiranjeevi Kota(iGATE)
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / softwaretester4u
hi this is good answer.But i have one question is it
possible to call differect sheets in same excel
like sheet1 have one data,sheet2 have some data in same
excel .is it possible to call ? pls tell me
| Is This Answer Correct ? | 0 Yes | 0 No |
what is custom check point? what is the diff.between custom check point and runtime Record check ?
2 Answers Infeneon Technologies,
what is the use of generate script that is avaliable 3 places(file settings, tools, object identification)
what is mean winrunner and load runner
How to read the third party controls in the application
what is the difference between bitmap checkpoint and image checkpoint
where does WR records the information about objects in AUT?
What is a checkpoint and what are different types of checkpoints?
ON PROPERTIES IT IS DECIDED WHICH TOOLS TO BE USED AMONG QTP, WINRUNNER, RATIONAL ROBOT, TEST DIRECTOR?
kindly provide me test cases on browser and calculator.Its very urgent.
Explain the purpose of gui spy?
How do you load GUI map?
What are the standards will you maintain at the timing of writing TSL script in WinRunner?