I'm trying make a table with the datatool package and a .csv created from an Excel file. I'd like this code to be as generic as possible since I will have to import a lot of .csv in this document. With this code, I can add vertical lines before, between and after the table and horizontal lines between rows. I'd like to add horizontal lines before the headers, after the headers and at the bottom of the table. I've tried every single tweak I have read, but I'm still failing. I would appreciate some help. link yo .csv file

    \caption{Tabla vientos}
    \DTLloaddb[noheader, keys={a,b,c,d,e,f,g,h,i,j,k},%
        \shortstack{dirección\\del viento},%
    \renewcommand{\dtldisplaystarttab}{\multicolumn{11}{c}{I am what I was looking for!}\\}
    \renewcommand{\dtldisplaycr}{\tabularnewline \hline}
  • Instead of the current code snippet, could you also provide the community with a small (but workable) CSV and make the document code compile? – Werner Mar 5 '15 at 3:54
  • Sure I can! How can I add a .csv? – Fran Mar 5 '15 at 11:11
  • It does compile now and I've added a link to the original .csv – Fran Mar 5 '15 at 11:21

After reading (again) the documentation for the datatool package I've found some commands that helped me doing what I wanted. In case someone have the same trouble, these are the commands

\renewcommand{\dtldisplayafterhead}{\hline \hline}

For adding two horizontal lines after the header

\renewcommand{\dtldisplayendtab}{\tabularnewline \hline \hline}

For adding two horizontal lines at the end of the table

 \renewcommand{\dtldisplaystarttab}{\multicolumn{11}{c}{I am what I was looking for!}\\\hline \hline}

For adding two lines before the headers as well as a text before these two lines

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.