I need a dynamic solution to produce questionnaires from a database of questions which gets updated from time to time. I thought of LaTeX for set out the layout but the question is whether LaTeX can import specified fields of an Acces or Excel or whatsoever external "database".

I also thought about WORD Macros and .NET programming, but I preferred LaTeX.

  • 1
    Is there a possibility to export in a plain text format, for example .csv? This is readily handled by TeX (provided the file is not too big!), but direct access to binary structures realistically requires LuaTeX.
    – Joseph Wright
    Commented Sep 10, 2012 at 14:24
  • Maybe you can use SQLTeX. Alternatively, you might be interested in the @EASE system which is part of the AcroTeXtools. Commented Sep 11, 2012 at 20:25

2 Answers 2


If "whatsoever external database" may be a plain text file like this data.dat example:

Newtown Road, Los Angeles, USA
209 \$

Regina Elena, 113, Milano, Italy
145 \euro

Where simply the field separators are carriage returns, then you can merge with a LaTeX document with the textmerg package as in this MWE:



{\bf Cots of donations to some good cause:}


Person & {\bf \Mr\ \Name\  \SurName }\\
Address & {\bf \Address }\\
Cost & {\bf \Donation } \\


Have a look at nlatexdb, I found it very useful.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .