| 1 |
% This file is embedded in datatool-user.pdf version 3.4.3 2025-12-04 |
| 2 |
% Example 71 Column with No Values |
| 3 |
% Label: "ex:nullcol" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage{datatool} |
| 9 |
\DTLnewdb{mydata} |
| 10 |
\DTLaddcolumnwithheader{mydata}{name}{Name} |
| 11 |
\DTLaddcolumnwithheader{mydata}{address}{Address} |
| 12 |
\DTLnewrow{mydata} |
| 13 |
\DTLnewdbentry{mydata}{name}{Zoë} |
| 14 |
\DTLnewrow{mydata} |
| 15 |
\DTLnewdbentry{mydata}{name}{José} |
| 16 |
\DTLnewrow{mydata} |
| 17 |
\DTLnewdbentry{mydata}{name}{Dickie} |
| 18 |
% this row has an empty name: |
| 19 |
\DTLnewrow{mydata} |
| 20 |
\DTLnewdbentry{mydata}{name}{} |
| 21 |
\begin{document} |
| 22 |
Number of rows: \DTLrowcount{mydata}. |
| 23 |
Number of columns: \DTLcolumncount{mydata}. |
| 24 |
|
| 25 |
\DTLdisplaydb{mydata} |
| 26 |
\end{document} |