% This file is embedded in datatool-user.pdf version 3.4.4 2026-07-31
% Example 110 Loading Data With No Parsing and Columns Identified as Decimal and Currency with Reformatting
% Label: "ex:loadxynoparsedecimalcurrconvert"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\begin{filecontents}[noheader,overwrite]{xydata.csv}
X,Y
-3.5,-2.75
-3,3
-2.5,-1
-1,1.5
1,-4.2
2.6,1.8
3.2,-0.4
\end{filecontents}

% requires datatool-english and datatool-regions to also be installed:
\usepackage[locales={en-BE}]{datatool}
\DTLsetup{store-datum}
\DTLread[
 name=xydata,
 format=csv,
 csv-content=no-parse,
 data-types={decimal,currency},
 convert-numbers
]{xydata.csv} 
\begin{document}
\DTLsortdata{xydata}{Y}
\DTLdisplaydb{xydata} 
\end{document}
