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:


no head,
table head=\hline,
late after line=\\\hline

Any advice would be greatly appreciated !

Thanks, Kind regards,


  • 1
    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, 2016 at 15:52

2 Answers 2


[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:


Changing your MWE to


  no head,
  table head=\hline,
  late after line=\\\hline]{data.csv}{}{\thecsvrow & \csvcoli}%

you now obtain the table:

enter image description here

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, 2016 at 6:49

Simple solution without lines:

\csvautobooktabular[table head=\toprule\csvlinetotablerow\]{data.csv}

table layout

This requires that you include in your header:


It's an easy solution because it doesn't need any more arguments. So, you can use it to read tables with a different number of columns – without having to re-specify them every time. It is straight from the manual, p. 39 / section 5.5.

However, if you want to change the style, for example add horizontal lines, I recommend @Andrew's answer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .