{datatool} is a tool to create and manipulate databases.

learn more… | top users | synonyms

17
votes
2answers
3k views

How typeset a numeric table from a CSV file

I have a CSV file (db.txt)like this: 30.0, 0.0, 0.0 60.0, 1.9098, 5.8779 90.0, 6.9098, 9.5106 120.0, 13.09, 9.5106 150.0, 18.09, 5.8779 180.0, 20.0, 0.0 I need to typeset it. My ...
5
votes
2answers
3k views

Formatting complex table from CSV using datatool

I have this csv file, formatted like this one: Store,Product 1,Product 2,Product 3,Product 4,Product 5,Sub Total Store 1,15,99,299,75,292,780 Store 2,33,353,429,283,561,1659 Store ...
10
votes
2answers
779 views

pgfplotstable or datatool?

What are differences, which to use for including .csv, .tsv files ? Datatool ? pgfplotstable ? I've seen at question : How typeset a numeric table from a CSV file how person asked about fixing ...
6
votes
2answers
186 views

How to put content from multiple databases in one table using datatool?

Almost too easy: I have two databases "First" and "Second", both get their data from tab-delineated files "First.txt" and "Second.txt" Both contain two columns ('year' and 'number') and an equal ...
4
votes
2answers
602 views

Tab separated files with datatool package?

The documentation of the package datatool says that the \DTLsettabseparator command changes the separator in .csv-Files from the default comma to the tab character. What it really does for me is ...
7
votes
3answers
929 views

datatool with longtable

I have a CSV file that has many rows. I want to typeset these rows into a table using longtable and datatool package. However just before before the "lastfoot" (which says concluded) I am getting ...
4
votes
1answer
91 views

Spurious blank space when adding a member to a database within \foreach

The MWE adds blank space proportional to the maximum value of the \foreach iteration: Why is this and how do I eliminate this additional space? Note: This problem seems similar to an earlier ...
3
votes
1answer
177 views

Spurious blank space when loading a datatool database

I am getting spurious blank spaces inserted upon loading a dtltool db. The MWE below produces links to all the image files named with a prefix the same as the .tex file: But if I comment out the ...
2
votes
1answer
985 views

How can I use \DTLloaddb package to create a table based on csv file?

I am new in Latex and I have some issues. I have succeeded in reading the .csv file: ,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,w21,w22,w23,w24 ...
31
votes
1answer
990 views

Helping cardinals elect the new Pope

Yes, we are talking about TeX and friends! Edit: I decided to move the background motivation to the end of the question, since it seems to be kind of off-topic in the TeX context. The following code ...
9
votes
1answer
3k views

How to use datatool package to read a CSV files so that they can be used in tables?

I am new in latex and I have some issues. I want to read a .csv file in latex to create a table, but I don't know how. I heard that datatool package can do this, but I don't know how to use it. My ...
12
votes
4answers
2k views

Is there a pure LaTeX or TeX package for chart drawing?

We are creating an easy-to-use LaTeX template for our institution. I'd like to have a pure LaTeX way to create simple bar graphs and pie charts. Does anything exist? I can certainly throw the students ...
11
votes
5answers
2k views

What is the proper way to create a horizontal table?

I want to have a horizontal table, like this: However, when using the usual method of creating a table, it quickly becomes a pain having to pre-define the number of columns (especially since I ...
5
votes
1answer
99 views

Obtain all different values of a specific column in a datatool database

how can I get all different values of a specific column in a datatool database? Example is the following table read into a datatool database: Name,Town,Age Adam,Xcity,20 Berta,Ytown,30 ...
7
votes
1answer
303 views

Storing unexpanded macro definitions (including #1, #2, …) for later use (now includes full usecase)

Preliminary Info I'm working on a new LaTeX package to make scoping more flexible. To do this I'll be capturing and reintroducing user defined commands behind the scenes. (For a comprehensive ...
5
votes
1answer
128 views

How to cherry pick from datatool DB and calculate totals

I have a CSV file with current prices/item. These prices are updated regularly. I have loaded a DB with datatool. I would like to use these prices to calculate totals according to quantities I have ...
3
votes
1answer
192 views

Problems in creating graphs using dataplot

I have four simple databases: db1 dy,volume 2009,120000 2010,160000 2011,400000 2012,650000 2013,1000000 2014,1500000 db2 dy,volume 2009,400000 2010,500000 2011,1600000 2012,2200000 2013,2500000 ...
2
votes
1answer
1k views

Importing CSV table - Error [closed]

I am new to LaTeX and am compiling a document right now using TeXworks. I am trying to create CSV tables into my document right now, and although I succeed in between I must have some small bug in the ...
1
vote
2answers
781 views

How to use \hlines and | column separators in a csv table uploaded with datatool

Hi I've been trying to use the datatool package to get data from csv files easily into documents as formatted tables. I seem to keep getting the lines on the first column shifted down by a row. If I ...
11
votes
3answers
475 views

No room for a new \count with datatool

This question led to a new feature in a package: datatool Update: 2013-1-19 The MWE worked fines with the new (v2.13) version of the datatool package using \DTLnewdbonloadfalse. But in my ...
6
votes
1answer
1k views

Command \AtBeginEnvironment already defined

I am pretty new to LaTeX. With windows, Miktex/Texmaker pretty-much takes care of package installation whenever needed, but on Ubuntu I have been downloading needed packages from CTAN and installing ...
5
votes
1answer
158 views

Conflicts with Datatool and babel (french)

I am having trouble compiling a latex document using an external CSV file with datatool and using the french language from the babel package. The content of my latex file is: ...
4
votes
1answer
221 views

Equivalent of \DTLiflastrow

With the datatool package there is a \DTLiffirstrow. I am looking for a similar command to detect the last row, \DTLiflastrow, but could not find one. I attempted to create my own but was not ...
3
votes
1answer
334 views

Combining invoice and datatool to create serial invoices

I want to generate invoices based on a CSV table. My approach looks like this: \documentclass{letter} \usepackage{invoice} \usepackage{datatool} \address{ABC AG \\ Nonamestreet 4 \\ 1100 ...
3
votes
1answer
184 views

Reading datafile entry by entry

In order to use pstricks in a certain fashion, I would like to access a datafile line by line, inside a multido loop. For example, let's say my file is called Datafile.dat. It contains the (x,y) ...
3
votes
2answers
245 views

\DTLdeletedb (from datatool package) has no effect within \foreach

This question led to a new feature in a package: datatool \DTLgdeletedb is available in (v2.13) and later. I am trying to use a \foreach loop to iterate over a few items. For each iteration ...
3
votes
2answers
209 views

Datatool : can't use \DTLreplaceentryforrow in nested loop “foreach”

In the following MWE (which make no real sense, but which is minimal:) ) I have two nested DTLforeach loops. The values displayed in the line "%for debugging" show the expected behaviour for the ...