csv format


#1

I have a music collection and I'm building a database so I can locate/play selected files. To do that I used mp3tag to export my collection's tags as a csv file.

What mp3tag exports is this - Title;Artist;Album;Track;Year;Length;Size;Last Modified;Path;Filename; i.e. text with semicolon separators

What it should export is this:

"Title","Artist","Album","Track",Year,Length,"Size",Last Modified,"Path","Filename"

"1. Allegro ma non troppo, un poco maestoso", "Ludwig van Beethoven","BEETHOVEN: SYMPHONY NO. 9 ''"CHORAL'"' HERBERT VON KARAJAN",1,1977,929,"14.14 MB",16/02/2007,"G:\my music\Beethoven - Symphony No 9 '"'CHORAL"'' - HERBERT VON KARAJAN","01-1. Allegro ma non troppo, un poco maestoso.mp3"

The commonly accepted separator is a comma - that's what the C in csv stands for.

The reason for putting text fields in quotes is because the text field may contain either , or ; as valid text.

The reason for changing single quotes to double quotes is to ensure the csv reader correctly recognises quotes within the text. "CHORAL" --> ""CHORAL""

Numerical fields do not need quote marks, and therefore programs will recognise these as numeric or date format.

Many of my mp3 tags contain either , or ; within the text, and this means no matter how hard I try I cannot correctly import the csv data into Excel or Access or SQL.

The changes to make this work are relatively small. I hope it can be included as a minor update.

Best wishes and many thanks for an excellent piece of software.

Derek Grainge


#2

I realise you can change the format by changing the csv configuration - but I don't see how you can correctly do things like double-quoting, assuming you want a file which is 'correct' csv


#3

Instead of e.g. %title% write $replace(%title%,","")