CSV output


#1

If you have a comma in a string it throws the export out by one cell. I've found the Replace function i(but haven't tried it yet), but would I have to apply this to each output string when exporting, or is there an easier way top apply it for every string?

Cheers

Steve


Export to columns
#2

The original CSV convention is:

  • numbers = 123
  • decimals = 123.45
  • strings = "hello, world"

A line from a CSV file can look like this for example:
"Heroes","Meat Loaf","100% Rock (CD2)","2003","02/18","05:09",11299801,44100,123.54,"Comment, that has a comma included"

There are some variations beside the original CSV convention:
SSV Semicolon Separated Values
TSV Tab Separated Values
and so on ...
Nearly all other characters are allowed to be a separator, if the target application can understand this. The one separator character must be unique to the 'CSV' file.

DD.20070219.0149


Text file - Tag
#3

I was using the default CSV export file, which for some reason was seperated by semi-colons!!

$filename("csv")Artist,Title,Album,Comment,Year,Length,Size,
$loop(%_filename%)"%artist%","%title%","%album%","%comment%","%year%","%_length","%_file_size%",
$loopend()build on %_date%

Throws up a syntax error, I remember reading about putting a escape character before the quotes etc.....I've just got to remember where I saw it!!

Using ' as the escape character solves the syntax error, but the output in the CSV is..

%artist%    %title%    %album%    %comment%    %year%    %_length    %_file_size%

So it doesn't parse the placeholders....I'm confused! :huh:


#4

The semi-colon character as separator in a CSV file has been used in Germany/Europe all over the last two decades or maybe three decades, because the german decimal point is traditionally designed as a comma character. Also the Germans do not use a thousands comma separator but a thousands point separator. Therefore a german alike CSV file is in fact a SSV file.
(american) "Peaches","Price",123.45,"Dollar" <==> "Pfirsiche";"Preis";123,45;"EUR" (german)
In former german versions of Excel the semi-colon character was the predefined standard separator when importing CSV files.

DD.20070220.0109


#5

So why is it called a CSV file if it used semi-colons!! :flushed:

Anyway that's beside the point :slight_smile:

All I want is to export the details in a spreadsheet which is causing me a headache!! HTML is so much easier to export to :frowning: