% This file is embedded in datatool-user.pdf version 3.4.2 2025-11-06
% Example 66 Adding New Columns Using Actions
% Label: "ex:addcolaction"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{datatool}
\begin{document}
\DTLaction{new}
\DTLaction{new row}
\DTLaction{add column}
Added column \DTLuse{column} 
(key: \DTLuse{key}; header: \DTLuse{header})
to database `\DTLuse{name}'. 

\DTLaction[key=quantity]{add column}
Added column \DTLuse{column} 
(key: \DTLuse{key}; header: \DTLuse{header})
to database `\DTLuse{name}'. 

\DTLaction[key=price,value=Price (\$)]{add column}
Added column \DTLuse{column} 
(key: \DTLuse{key}; header: \DTLuse{header})
to database `\DTLuse{name}'. 
\end{document}
