1

Following tex source using csvsimple does not produce any output:

\documentclass[a4paper,11pt]{article}
\usepackage{csvsimple}

\begin{document}
\csvreader[head to column names,separator=semicolon]{test.csv}{}
          {\LASTNAME \\}
\end{document}

Contents of test.csv:

UID;CASID;USERNAME;LASTNAME;FIRSTNAME;MAIL;VALID;CIV;MIDDLENAME;URL;LANGUEID;PHONE;FAX;DATE;Arrival date;Departure date;Number of accompanying persons;Institution;Mailing Address;Country of organization;Laboratory;STATUS
1;1;user;doe;joe;joe@yahoo.com;;;;;;;;;;;;college;;;;;

Log of pdflatex:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Arch Linux) (preloaded format=pdflatex 2019.8.25)  28 SEP 2019 08:40
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2018-12-01>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf-dist/tex/latex/csvsimple/csvsimple.sty
Package: csvsimple 2016/07/01 version 1.20 LaTeX CSV file processing

(/usr/share/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys@pathtoks=\toks14
\pgfkeys@temptoks=\toks15

(/usr/share/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
\pgfkeys@tmptoks=\toks16
)))
(/usr/share/texmf-dist/tex/latex/base/ifthen.sty
Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
)
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2018/08/19 v2.5f e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count88
)
(/usr/share/texmf-dist/tex/latex/tools/shellesc.sty
Package: shellesc 2016/06/07 v0.02a unified shell escape interface for LaTeX
Package shellesc Info: Restricted shell escape enabled on input line 69.
)
\csv@file=\read1
\c@csvinputline=\count89
\c@csvrow=\count90
\c@csvcol=\count91
\csv@out=\write3
)
No file test.aux.
\openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 4.
LaTeX Font Info:    ... okay on input line 4.
(./test.aux) ) 
Here is how much of TeX's memory you used:
 1584 strings out of 492623
 32925 string characters out of 6135669
 93181 words of memory out of 5000000
 5559 multiletter control sequences out of 15000+600000
 3940 words of font info for 15 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 40i,1n,46p,770b,36s stack positions out of 5000i,500n,10000p,200000b,80000s

No pages of output.
PDF statistics:
 0 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
1

The problem lies in the formatting of the test.csv file. The entry contains an extra final ;. To solve the problem one can either

--add an extra field in the header

UID;CASID;USERNAME;LASTNAME;FIRSTNAME;MAIL;VALID;CIV;MIDDLENAME;URL;LANGUEID;PHONE;FAX;DATE;Arrival date;Departure date;Number of accompanying persons;Institution;Mailing Address;Country of organization;Laboratory;STATUS;extra
    1;1;user;doe;joe;joe@yahoo.com;;;;;;;;;;;;college;;;;;

--remove a ; at the end of the entry

UID;CASID;USERNAME;LASTNAME;FIRSTNAME;MAIL;VALID;CIV;MIDDLENAME;URL;LANGUEID;PHONE;FAX;DATE;Arrival date;Departure date;Number of accompanying persons;Institution;Mailing Address;Country of organization;Laboratory;STATUS
1;1;user;doe;joe;joe@yahoo.com;;;;;;;;;;;;college;;;;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.