## how i can use \usepackage{csvsimple}

please how i can use \usepackage{csvsimple} ?

i have ph.csv and 3 head in csv file:
n - name - num

\newcommand{\subject}{
\onecopy{1}{

\noindent{\bf AutoMultipleChoice  \hfill TEST}

\vspace*{.5cm}

\begin{center}\em
Pre-filled test.
\end{center}

\hfill \namefield{\fbox{
\begin{minipage}{.5\linewidth}
Name:

\Large\bf \name{} \surname{}

\vspace*{1mm}
\end{minipage}
}}

\noindent\hrulefill

\vspace{1ex}

\shufflegroup{general}
\insertgroup{general}

\AMCassociation{\id}
}
}


and add this code in the after beign{docum}:

\csvreader[head to column names]{students.csv}{}{\subject}


but i don't got any thing!

### Replies (1)

#### RE: how i can use \usepackage{csvsimple} - Added by Alexis Bienvenüeover 9 years ago

The "head to column names" option tells csvreader to make command names from the CSV headers. For the example you used, the column names were id, name and surname, but not for your CSV file! So you have to adapt the example using for example \name{} instead of "\name{} \surname{}" and \num instead of \id.

(1-1/1)