I am wondering if there is a way to read the data from an excel file and then somehow using a forloop outside a tabular, get a special exam sheet for each student.
Until now, we have been using a code similar to this one:
Fill the blanks below and answer the question.
\begin{tabular}{|l|l|}
\hline
Name: & E-mail: \\ \hline
Surname: & Student Number: \\ \hline
\end{tabular}
Question: 2+2=?
and we print the above paper 100 times for a class of 100 student. Now I want to do something like this:
\readfile{students.xls}
\forloop{from i=1 to i=100}{
Answer the question below.
\begin{tabular}{|l|l|}
\hline
Name: \cell{A_i} & E-mail: \cell{B_i} \\ \hline
Surname: \cell{C_i} & Student Number: \cell{D_i} \\ \hline
\end{tabular}
Question: 2+2=?
\newpage
}
to get a 100-page .pdf file in which every student has a special page.
Thanks in advance.
datatool
package and a csv file (you can export your excel file into a csv format)