<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% This file is embedded in datatool-user.pdf version 3.4.1 2025-04-25
% Example 64 Trimming New Values
% Label: "ex:newvaluetrim"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage{datatool}
\DTLnewdb{mydata}
\DTLnewrow{mydata}
\DTLsetup{new-value-trim=true}
\DTLnewdbentry{mydata}{Column1}{ value1 }
\DTLnewrow{mydata}
\DTLsetup{new-value-trim=false}
\DTLnewdbentry{mydata}{Column1}{ value2 }
% compare with \DTLaction:
\DTLsetup{default-name=mydata}
\DTLaction{new row}
\DTLaction[column=1,value= value3 ]{new entry}
\DTLaction{new row}
\DTLaction[column=1,value={ value4 }]{new entry}
\begin{document}
% display the data with the values quoted:
\renewcommand{\dtlstringformat}[1]{``#1''}
\DTLdisplaydb{mydata} 
\end{document}
</pre></body></html>