Writting blocks of data in TextFile
-
Hello,
What is the easiest way to write repetitive blocks of data into a Text file.
For example a structure like this:EVENEMENT INSTANT = 32 ENTREES E19 = FAUX E20 = FAUX FIN EVENEMENT INSTANT = 34 ENTREES E21 = FAUX E22 = FAUX FIN EVENEMENT INSTANT = 36 ENTREES E21 = VRAI E22 = FAUX FIN EVENEMENT INSTANT = 38 ENTREES E23 = FAUX E24 = FAUX FIN EVENEMENT INSTANT = 40 ENTREES E23 = FAUX E24 = VRAI FIN
This data is read from an excel file.
-
Hi,
Where are the data coming from ?
-
So you have to read them from that Excel file, do some processing and write the result to a text file ?
-
@Babs
So at some level do you want to (useQFile
&QTextStream
to) loop reading the lines from the file, do whatever modification appropriate in memory, and write the resultant line back out to a new file? Or, you can read all the lines into aQList
in memory, make all the changes, and write the whole new file back. -
What do you put in your QList ?
Can you explain what is the exact issue you are having with writing the content you are reading from the Excel file to another text file ?