I started learning LaTeX (on Overleaf) and I have to insert a table. Due to the size of the table, for convenience I want to import it as CSV.
I replicated the same code from internet (as Importing csv file into latex as a table )
With this code
\documentclass{book}
% Language setting
% Replace english' with e.g.spanish' to change the document language
\usepackage[english]{babel}
% Set page size and margins
% Replace letterpaper' witha4paper' for UK/EU standard size
\usepackage[letterpaper,top=2cm,bottom=2cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry}
% Useful packages
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage[colorlinks=true, allcolors=blue]{hyperref}
\usepackage{csvsimple}
\title{Your Paper}
\author{You}
\begin{document}
\maketitle
\section{Introduction}
\begin{tabular}{l|c}%
\bfseries Person & \bfseries Matr.~No.% specify table head
\csvreader[head to column names]{csv_dir/grade.csv}{}% use head of csv as column names
{\\hline\givenname\ \name & \matriculation}% specify your coloumns here
\end{tabular}
\section{Some examples to get started}
\bibliographystyle{alpha}
\bibliography{sample}
\end{document}
I got this error
Extra }, or forgotten \endgroup. Missing \endcsname inserted.
This is the csv, located in csv_dir folder
\begin{filecontents*}{grade.csv}
name,givenname,matriculation,gender,grade
Maier,Hans,12345,m,1.0
Huber,Anna,23456,f,2.3
Weisbaeck,Werner,34567,m,5.0
\end{filecontents*}
\documentclass{...to\end{document}. Also provide the content of the externalcsvfile that you are loading. As it stands it is impossible to diagnose your issue. – Willie Wong Jul 25 '23 at 02:30