[OS X TeX] Mail merge from Excel to LaTeX letter class?

Alan Munn amunn at msu.edu
Fri Oct 31 11:05:27 EDT 2008


At 10:52 PM -0400 10/30/08, Michael Hanson wrote:
>All:
>
>I have an existing Excel worksheet with contact information that I'd 
>like to "mail merge" into a set of LaTeX-generated letters. 
>Ideally, I'd like to be able to just push a button in TeXShop and 
>have this work -- maybe a macro or engine?  I'm willing to learn 
>some basic coding to facilitate a relatively automated solution, but 
>I'm not in a position to use some of the LaTeX mail merge 
>suggestions I have seen on the web -- my lisp or mysql or awk skills 
>are non-existent, for example.  I'd also prefer to avoid cutting and 
>pasting the data into another file format (such as plain text) -- I 
>might as well paste them into individual LaTeX documents at that 
>point.  Any suggestions based on personal experience with a 
>particular solution would be especially welcome.

Use Nicola Talbot's  datatool package.  It allows you to read Excel 
CSV files directly into your LaTeX document.  There's an explicitly 
worked out example of how to do mail merge in the documentation. I'm 
not sure if it's part of TeXLive, but you can get the most recent 
version on CTAN or here:

<http://theoval.sys.uea.ac.uk/~nlct/latex/packages/index.html>

It's pretty easy to use.

Alan

-- 
Alan Munn						amunn at msu.edu
Department of Linguistics
and Germanic, Slavic, Asian and African Languages		Tel. 
	517-355-7491
Michigan State University, East Lansing MI 48824 USA	Fax	517-432-2736



More information about the MacOSX-TeX mailing list