Ask a Question

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

SOLVED
VeenaDevi
Contributor

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();

2 ACCEPTED SOLUTIONS

Accepted Solutions
Marsha_R
Community Hero

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

I would ask Support about that directly.  Here's the link:

https://support.smartbear.com/testcomplete/message


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

View solution in original post

sonya_m
Community Manager

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

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.

 


Sonya Mihaljova
Community and Education Specialist

View solution in original post

6 REPLIES 6
Marsha_R
Community Hero

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

I would ask Support about that directly.  Here's the link:

https://support.smartbear.com/testcomplete/message


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

View solution in original post

sonya_m
Community Manager

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

Thank you, Marsha!

 

Hi @VeenaDevi ! Unfortunately, I wasn't able to locate your support ticket, could you let the Community know if you were able to solve the issue and provide details on that? Thank you!


Sonya Mihaljova
Community and Education Specialist

VeenaDevi
Contributor

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

Created ST for the same :

00486425

LSMURUGAN1981
New Contributor

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

I am also getting the same error. I am writing the excel report at step level for each click, enter, select, etc. Before Excel.Save or Excel.Open step is completed, it is proceeding to the next line of code and eventually fails the test.

 

No proper integration of Excel.Save or Excel.Open is not concluded before it moves to the next line of code.

LSMURUGAN1981
New Contributor

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

Support Ticket - 00489631

sonya_m
Community Manager

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

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.

 


Sonya Mihaljova
Community and Education Specialist

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: