Graphics, Figures & TablesRefilling tables with data produced by an external program

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mgoldenbe
Posts: 3
Joined: Wed Dec 31, 2014 7:46 pm

Refilling tables with data produced by an external program

Post by mgoldenbe »

I wrote a program that generates numeric data on which the tables in my article are based. I would like to find a way to automatically update all the numbers in the article when the program is re-run. The tables can have a complex format, so that simply importing the data into a spreadsheet and then exporting as a latex table format leaves much manual work to do. I am thinking in the direction of producing a prototype table that has a placeholder for each number and writing a script that would substitute the placeholders with the numbers produced by the program. However, before trying to implement something sophisticated, I would like to ask whether anyone has come up with a better way or tried the one I described.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Refilling tables with data produced by an external program

Post by Stefan Kottwitz »

Hello,

and welcome to the forum!

I would use the datatool package for that purpose. It can load data from files, if desired sort it, and you can let datatool iterate through the data (by one command) so that it produces your table rows.

If you would post sample data and a sample table, I could try to implement it for you.

Stefan
LaTeX.org admin
mgoldenbe
Posts: 3
Joined: Wed Dec 31, 2014 7:46 pm

Refilling tables with data produced by an external program

Post by mgoldenbe »

Stefan_K wrote: I would use the datatool package for that purpose.
This seems to be exactly what I am looking for, but the link points to a huge documentation file. Has anyone compiled a list of key features that would suffice for most uses? Thanks!
Post Reply