# Custom separator for CSV import via csvsimple

I have successfully used csvsimple to import .csv files. But I would like to have commas as number separators, so I modified the .csv file to use semicolons as separators and as csvsimple manual says, I defined it with separator=semicolon like this

\begin{tabular}{c|c c|c}%
& \bfseries A & \bfseries B & \\\hline
{csv/test.csv}{}%
{\bfseries\cat & \A & \B & \acc\%}%
\end{tabular}


but I keep getting error ! Package pgfkeys Error: I do not know the key '/csv/separator' and I am going to ignore it.

• Hi, and welcome to TeX.sx. Can you please turn this into a complete compilable document that produces the error. When I construct such an example, it works. – Alan Munn Jun 21 '14 at 1:04
• What version of csvsimple are you using? According to the CHANGES file, separator was introduced in version 1.07. – Nicola Talbot Jun 21 '14 at 17:17
• Package: csvsimple 2012/11/08 version 1.06 LaTeX CSV file processing. you are right. I knew, that the version is quite new from last year, but I didn't realize that Ubuntu 13.10 has older versions in repositories... thanks – betatester07 Jun 23 '14 at 11:27

I used /csv/separator=semicolon instead of separator=semicolon and it worked.

• Please add a compilable MWE for an easy proof of the op. That's the usual way here to make an good answer. Welcome! – Mensch Feb 26 '16 at 21:17
• Thank you. But I don't get it, can you explain? – Nicholas Feb 29 '16 at 12:51

Maybe this helps:

\documentclass{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage{datatool}

\usepackage{filecontents}
\begin{filecontents*}{mydata.csv}
a1;b1;c1;d1
a2; "b21 and b22";c2;d2
\end{filecontents*}

\DTLsetseparator{;}
keys={A,B,C,D}
]{mydb}{mydata.csv}
%=======
\begin{document}
%=======

\DTLforeach*{mydb}{\A=A,\B=B,\C=C,\D=D}{
\section{\A}
\begin{tabular}{c|c c|c}%
& \bfseries \A & \bfseries \B & \\\hline
\bfseries \C & Y & Z
\end{tabular}
}
%=======
\end{document}
%=======

• This doesn't really answer the question, which deals with the csvsimple package, not datatool. Since both are fine packages, it's not clear that suggesting someone switch is really appropriate. – Alan Munn Jun 21 '14 at 1:06