# Simple table with csvsimple, with no headers

I am not managing to make a simple table in csvsimple.

My data is like this: value 1, 5.5 value 2, 3806.0 value 3, 601.0 value 4, 26.8 value 5, 150.0 value 6, 2.0 value 8, 75.0 value 9, 21

I have made the following code and I cannot figure out what is the problem:

\documentclass{article}
\usepackage{csvsimple}

\begin{document}
late after line=\\\hline
]{data.csv}
\end{document}


Any advice would be greatly appreciated !

Thanks, Kind regards,

Nicolas

• 1. After the key tabular, there should be only one =. 2. \csvreader requires three regular arguments. 3. Try \csvreader[tabular=|l|r|,no head,table head=\hline,late after line=\\\hline]{data.csv}{}{\csvcoli & \csvcolii} (note the second and third argument). 4. Read the fine manual. – gernot Aug 17 '16 at 15:52

[EDIT Some how I missed @Gernot's comment. This answer is nothing more than an expanded version of what he wrote.]

I think that you have two problems.

1. A typo: tabular==|l|r| should be tabular=|l|r|.
2. There are missing arguments to the \csvreader command that are supposed to say how the table should be constructed.

From your question it is not entirely clear to me what data.csv looks like so I have used the file:

5.5
3806.0
601.0
26.8
150.0
2.0
75.0
21


\documentclass{article}
\usepackage{csvsimple}

\begin{document}
late after line=\\\hline]{data.csv}{}{\thecsvrow & \csvcoli}%
\end{document}


you now obtain the table:

Note that \thecsvrow gives the row number and, for a given row, \csvcoli gives the entry in column 1. There are also \csvcolii, \csvcoliii and so on. So the argument {\thecsvrow & \csvcoli} to \csvreader says that each of the table show start with the row index and then have the corresponding entry in column 1 of the data file.

Finally, I'd recommend reading the manual from the booktabs package as it explains why you shouldn't use vertical rules in tables:)

• Thank you very much to both of you ! I had read the manual but had not understood that the {} between the filename and the column choice was mandatory, nor had I understood that the column choice was mandatory. I thought csvreader would just take all columns if left unspecified (like csvautotabular). Again, big thanks ! ;-) – Nicolas Aug 18 '16 at 6:49

Simple solution without lines: