Export TO CVS bug

edited 1:29AM 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 1:29AM
    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 1:29AM
    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 1:29AM
    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