Export TO CVS bug

edited 7:13PM in FastReport 3.0
Hi,

I try to export to CVS a report, everything works fine except two problems:

1. It doesn't escape double quotes: " should be converted to ""
2. It adds a delimiter at the end of each row

So if I have 2 records:

1 string1 string2
2 string3 stri"ng4

the CSV generated file looks like:

"1","string1","string2",
"2","string3","stri"ng4",

but it should look like:

"1","string1","string2"
"2","string3","stri""ng4"

Can this be fixed?

Thanks.
Vasile

Comments

  • edited 7:13PM
    valos wrote:
    2  string3  stri"ng4

    but it should look like:

    "2","string3","stri""ng4"
    If you have:
    2 string3 stri"ng4

    then the result using MS Excel is:
    2,string3,"stri""ng4"

    What show above is there is no double quote (") for: 2 and string3.
    This what CSV (Comma Separated Value) means in Excel.

    BUT, how does SQL Server 2K handling CSV?
    The CSV created by SQL Server 2K is:
    2,string3,stri"ng4

    Interested?
  • edited 7:13PM
    I don't know what is the relevance of SQL Server 2K here or how it handles CSV.

    The following CSV formats:

    2,string3,"stri""ng4"

    and

    "2","string3","stri""ng4"

    ARE BOTH VALID and accepted by MS Excel.

    What I wanted to highlight here is a bug in CSV export because it doesn't escape double quotes.
  • edited 7:13PM
    Hi,

    Can somebody from FastReport team confirm wheter or not this is a bug in their opinion and if this will be fixed or not in the next FR3 release please?

    Many thanks,
    Vasile

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.