Forum Discussion

VeenaDevi's avatar
VeenaDevi
Contributor
3 years ago
Solved

Using Same Excel file for dataDriven as well as to update Using Excel Write

In Data Driven loop , as the last statement , i am trying to update the last column as Status (looping via Rowindex maintained in Variable and incrementing ) , however when call excel.save , TestComplete throwing " Failed to delete the 'OrderData.xlsx' file. 12.28.38 Normal 0.13 0.13

 

How to use the same file for data driven loop and update the new column 

 

excelSheet.Cell('H', excelRow).Value = message;

// Save the file to apply the changes
excelFile.Save();

  • sonya_m's avatar
    sonya_m
    3 years ago

    Let me quote what support replied to Veena as this might be of help to others, as well:

     

    >> The reason for this issue is that when you use data from the Excel file (read data) in the Data-Driven testing, it is not possible to write in this file. In this case, I would recommend creating a copy of this Excel file and write all changes there - thus it will help avoid this error.

     

6 Replies