Forum Discussion
How frequently are you calling this code? Basically, each time it's called, you're creating another instance of the Excel.Application. Which, BTW, IS opening and running Excel, just not with a full UI... So, everytime the below code is called, you run Excel... that will, certainly, create memory and performance issues. You should make sure that, once you're finished with objects, you dispose of them. Yes, there are "garbage collectors" and such, but good practice is to always free objects when you're done with them.
An alternative solution which doesn't have quite so much overhead is to, instead of using Excel, use the aqFile object and associated methods and properties to write the data out to CSV. Excel can easily read and process CSV files. Less overhead and it's a lot more portable.
- rushikesh6 years agoContributor
tristaanogre Thanks for the inforamtion.
Can you provide any refrence on how to write data in csv file in test complete.
I could get information of reading data from csv file but found no luck related to writing the data.
- tristaanogre6 years agoEsteemed Contributor
A very basic example of how to write out to a text file is given at https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfile/writetotextfile.html
To write to a CSV is simply to take that code and modify it to update the output to be comma delimited rows.
Related Content
Recent Discussions
- 2 days agovladd1