how to create CSV file and write data?
Hi, I need to create a new csv file using python scripting and write data in file as per functionality. I know trough aqFile we can create but except this any other methods/way to create a CSV file like Excel method to create excel files.
Thanks in advance.
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?
It looks like this might work better for you. The properties give you access to the row and column numbers in a text file.
Thank you very much for this info. In that link they clearly mentioned for text files only(The aqTextFile object provides programming access to text files.) Then may I know how it will support for other format files and why don't TC provide relevant method for .CSV files. I could see for retrieve data from CSV we have CSVDriver method.
You might want to add your .csv idea here
In the meantime, if you tell us what you are actually trying to accomplish with this test, perhaps we can find another way to do it.
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.