Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
I have created a macro that exports a chart to a delimited (txt or csv) file. The Developer can decide which delimiter to use, what file name and how many header rows to omit.
Features :
- File name
- File Type (txt and csv have been tested)
- Output directory
- Delimiter
- Number of header rows to remove
The macro actually exports the chart to a file (with headers), let's call it File1, using the desired delimiter. Then it starts reading through File1, first skipping any header lines, and then each read line is written to File2. Once this is competed, File1 is deleted and File2 is the desired output.
Reading from File1 and writing to File2 line by line, brings up a performance issue. It took approximately 10 minutes on my laptop, to browse through 1 million lines and 4 fields. Not bad, but I think that there must be a way to improve this.
So please feel free to comment, change and improve the attached QVW so that it performs better. Currently it has 10000 lines of data, but this can easily be changed in the script (reload needed after any change): LET vLimit = 10000;
Looking forward to your suggestions!
Thank you.
Giakoumakis Ioannis.
Well, either the application is so perfect that there is nothing to comment about or it is so terrible that it is not worth commenting...
Well, either the application is so perfect that there is nothing to comment about or it is so terrible that it is not worth commenting...
Works like a charm, thanks Ioannis. I was previously doing this though a QlikView export then a separate batch script to remove the headers. This is much more elegant.