Export to CSV Adding Extra Blank Fields
Hi
If I export to csv, the resulting file always randomly contains extra field delimiters. What can I do to ensure only the field data is included
Hi
If I export to csv, the resulting file always randomly contains extra field delimiters. What can I do to ensure only the field data is included
Comments
G'day PK,
I don't know what your requirements are, but the "Export to CSV" Component like the others (e.g. "Export to Word") are very sensitive to the format of the report, and will insert cells in imitation of the designed report. So will also get extra rows for headers, blank lines, footers, page breaks etc.
If your requirement is to create a file that contains only the data of your report you would be better off using other functionality.
We use the ISAM functionality in Delphi to allow the User to choose to export as CSV or Excel format and this gives us a lot of control over the content and format of the Export without compromising the appearance of the associated Reports.
Cheers, Paul
Hello Paul
Thanks for your feedback. I must admit, this is first time hearing of ISAM in Delphi, do you have a small example demo I could look at.
Regards
PK
G'day PK,
Sorry I don't have a prototype to hand (we set this up in 2015 so all the original things have been "archived"),
However I can do better than that and point you to the 2014 article that helped me get my head around this in the first place 😊
https://www.swissdelphicenter.ch/en/showcode.php?id=1443
With many thanks to Carlo Pasolini!
Cheers, Paul