I am very new to LaTex I met it a week ago while trying to build tables of my results output from Stats I have read a lot of documentation but I have not been able to implement many. I discovered I can go from .csv or excel, I downloaded excel2LaTex add in and yet I not been able to use it after a lot of efforts. Can I get clear implementable guidance, probably how to build tables from excel or csv, dummy-level guidance. Thank you Dr Obum

  • It might be easier to read the csv directly using csvsimple or pgfplotstable. The latter is better for numerical data. – John Kormylo Nov 7 '17 at 13:24

Welcome to LaTeX, the in-side of the typography magic.

What you are using seems to me more like a black-box, where you would be on the out-side, and everything is somewhat opaquely done by some "Wizard"

I would suggest you, rather to

  1. open the csv with a notepad or any plain text editor,
  2. replace each comma (,) with an ampersand (&)-- if possible separated by two spaces on both sides to improve readability, and then
  3. include the whole data within this code:

        \begin{tabular}{l l l ...}
             ... ... ...
             ... ... ...

with so many l, c or rs as the number of columns in your Excel data (for left, center or right-justifying the contents).

More about this here: https://www.sharelatex.com/learn/Tables


At first, when I must create table I used outer tools which generate LaTeX code.This is some of them


My suggestion in three words: R, xtable, knitr. Save the example with .Rnw extension. You can compile it easily with Rstudio or see How to build Knitr document from the command line.


\subsection*{The original CSV file:} 
% Just to make the table.csv 
table <- data.frame(A=c(1.234,2.123,3.1416,4.44,5.001),
row.names(table) <- c("One","Two","Tree","Four","Five") # Ahem!
write.csv(table, file = "table.csv",row.names=T)

\subsection*{The \LaTeX\ table:}
tablecopy <- read.csv(file = "table.csv",  row.names = 1, check.names = F)
print(xtable(tablecopy,caption="The CSV data"), 
caption.placement="top",include.rownames=T,booktabs = TRUE)

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.