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 productsAlternatively 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.
