About
Shop
LaTeX
Software
Books
Gallery
News
Contact
Blog
Settings
Account
Latest news 2021-06-05: New blog post: Dickimaw Books Site Account.

Displaying Data Imported from a Spreadsheet

This code requires the shop.xls spreadsheet. The file shop-products.dbtex is created using:

datatooltk --output shop-products.dbtex --xls shop.xls --sheet products
Alternatively you can use datatooltk-gui to import the data and save it to a file called shop-products.dbtex.
\documentclass[captions=tableheading]{scrartcl}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{datatool}

\DTLloaddbtex{\products}{shop-products.dbtex}

\begin{document}

Data imported from \texttt{shop.xls} is shown in 
Table~\ref{tab:products}.

\begin{table}
  \caption{A Sample Product List}
  \label{tab:products}
  \centering
  \DTLdisplaydb{\products}
\end{table}

\end{document}

Download sample-datatooltk-xls.tex or sample-datatooltk-xls.pdf.

© 2015 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs