I try to format a CSV file as a table and ran into the issue that the csvsimple package repeats the head elements after a % sign appears in the file. Consider the following MWE (strongly reduced from my original classicthesis file):

\documentclass[paper=a4]{scrreprt}

\RequirePackage{tabularx}
\usepackage{filecontents}

\RequirePackage{csvsimple}

\csvset{every csv/.style={
separator=semicolon,
respect percent
}}

\begin{filecontents*}[overwrite]{Courses.csv}
A;B;C;D;E;F;G;Portion;H;I
a;b;c;d;e;f;g;100%;1,00;3,00
a;b;c;d;e;f;g;100%;2,00;4,00
\end{filecontents*}

\begin{document}

\begin{table}[h]
\centering
\begin{tabularx}{\textwidth}{XXXXXXXXXX}
\end{tabularx}
\end{table}

\end{document}


The output looks like this:

Note that the % signs are missing in the first and second data row (second and third row of the table) and that the last two columns are filled with the column headings instead of the content. I verified that csvsimple is configured to respect % signs (see package options) and that the output of filecontents is actually correct. (Note: Even respect all does not change this behavior)

Oddly, if I remove the no head flag, csvsimple prints the first table row correctly, but skips all remaining rows. Even if I add 100 additional rows, only 1 is printed:

I am a bit lost on what else to try. How can I can configure/convince csvsimple to print all rows correctly in my table?

cvssimple sets the catcode of the percent char locally, and in a tabular, where cells build groups, it gets lost again. Change it before the tabularx:

\documentclass[paper=a4]{scrreprt}

\RequirePackage{tabularx}
\usepackage{filecontents}

\RequirePackage{csvsimple}

\csvset{every csv/.style={
separator=semicolon,
respect percent
}}

\begin{filecontents*}[overwrite]{Courses.csv}
A;B;C;D;E;F;G;Portion;H;I
a;b;c;d;e;f;g;100%;1,00;3,00
a;b;c;d;e;f;g;100%;2,00;4,00
\end{filecontents*}

\begin{document}

\begin{table}[h]
\centering
\catcode\%=12
\begin{tabularx}{\textwidth}{XXXXXXXXXX}
`