Forum Discussion
8 Replies
- rraghvani
Champion Level 3
You can read comma-separated values using DDT.CSVDriver Method, but you can't write.
- veerasureshkOccasional Contributor
Thanks but already I know this method and my requirement is need to create a new CSV file and write data on it.
- Marsha_R
Champion Level 3
aqFile.Create and aqFile.WriteToTextFile should work for you. Why don't you want to use aqFile?
- veerasureshkOccasional Contributor
Thank you very much. I can agree with your point but with WriteToTextFile or any other method, shall we write data on particular row or column with respective header. Is it possible?
- Marsha_R
Champion Level 3
It looks like this might work better for you. The properties give you access to the row and column numbers in a text file.
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqtextfile/index.html
- rraghvani
Champion Level 3
My suggestion is to create a Data Structure, a B-tree may be complex to write, but an Array will be able store the data, read from the csv file. You can then manipulate the Array, using rows and columns to perform the required actions you need, and then write the Array data back to the csv file.
Examples, Convert from CSV to array in Python, Dump a NumPy array into a csv file