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

Comments

  • PolomintPolomint Australia
    edited August 2023

    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

  • PolomintPolomint Australia

    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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.