How to open excel file in WinRunner?

Questions by sanjeevtesting

Showing Answers 1 - 2 of 2 Answers

Suma

  • Oct 31st, 2007
 

We can use the TSL ie. ddt_open(table_name, open_mode) to open any excel file.

Ex.

invoke_application("C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Excel","","",SW_SHOW);
ddt_open("D:\Suma\Book1", DDT_MODE_READ);

  Was this answer useful?  Yes

table = "<Give the path of the excel file where it is located in your system>"; rc = # This function opens your excel sheet in readmode.if (rc!= E_OK && rc != E_FILE_OPEN) # This will check whether excel sheet exists in the specified path or not pause("Cannot open table."); ddt_get_row_count(table,table_RowCount); # This fun will get the no of rows in your excel sheetfor(table_Row = 1; table_Row <= table_RowCount; table_Row ++) { ddt_set_row(table,table_Row); # This will set the focus to first row of your excel.< Wite your functionality here>} ddt_close(table); # This fun will close the excel fileHope this solves your prob.Balaram

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions