| 1 |
ABOUT |
| 2 |
|
| 3 |
Exceltex is a LaTeX package combined with a helper program written in |
| 4 |
Perl. It provides a easy to use yet powerfull and flexible way to get |
| 5 |
data from Spreadsheets into LaTeX. |
| 6 |
|
| 7 |
In difference to other existing solutions, exceltex does not seek for |
| 8 |
making the creation of tables in LaTeX easier, but to get data from |
| 9 |
Spreadsheets in into LaTeX as easy as possible. |
| 10 |
|
| 11 |
The excel fileformat acts as an interface between the spreadsheet |
| 12 |
application and exceltex beacause it is easily accessible via the |
| 13 |
Spreadsheet::ParseExcel Perl module and because most spreadsheet |
| 14 |
applications are able to read and write excel files. |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
REQIREMENTS |
| 20 |
|
| 21 |
Exceltex depends on the perl module Spreadsheet::ParseExcel and the |
| 22 |
LaTeX Packages ulem and color. |
| 23 |
|
| 24 |
Currently a Unix like operating system is required, cygwin on windows |
| 25 |
should work also. |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
LATEX COMMANDS |
| 32 |
|
| 33 |
Exceltex provides two commands to include single cells and cell-ranges |
| 34 |
for tabulars. Load the exceltex LaTeX package via |
| 35 |
\usepackage{exceltex}. |
| 36 |
|
| 37 |
\inccell{foo.xls!results!B9} |
| 38 |
includes cell B9 from sheet results in file foo.xls |
| 39 |
|
| 40 |
\inctab{foo.xls!results!B2!C15} |
| 41 |
includes the 14 rows between B2 and F15 from sheet results |
| 42 |
in file foo.xls in LaTeX' tabular format ('&' separated rows |
| 43 |
ended by \\) |
| 44 |
|
| 45 |
For both commands you may omit specifying the file (foo.xls) if it has |
| 46 |
the same basename (foo) as the LaTeX file (foo.tex). |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
USAGE |
| 52 |
|
| 53 |
Mark cells and tabulars for inclusion with the \incell and \inctab |
| 54 |
commands. Then run latex, exceltex and latex again. |
| 55 |
|
| 56 |
The following Example demonstrates the usage of exceltex: |
| 57 |
|
| 58 |
--- snip --- |
| 59 |
\documentclass{article} |
| 60 |
\usepackage[options]{exceltex} |
| 61 |
|
| 62 |
\begin{document} |
| 63 |
|
| 64 |
\title{a brief introduction to exceltex} |
| 65 |
\maketitle |
| 66 |
|
| 67 |
\section{including single cells} |
| 68 |
|
| 69 |
You can include contents of cells with the \\inccell command. Example: |
| 70 |
Cell A1 on sheet 'Sheet1' of file foo.xls is: |
| 71 |
\inccell{foo.xls!Sheet1!A1} |
| 72 |
|
| 73 |
|
| 74 |
\section{including tabulars} |
| 75 |
|
| 76 |
this is as easy as including single cells. |
| 77 |
|
| 78 |
\begin{tabular}{lll} |
| 79 |
\hline |
| 80 |
column 1 & colum 2 & colum 3 \\ |
| 81 |
\hline |
| 82 |
\inctab{foo.xls!Sheet1!A1!C5} |
| 83 |
\hline |
| 84 |
\end{tabular} |
| 85 |
|
| 86 |
\end{document} |
| 87 |
--- snap --- |
| 88 |
|
| 89 |
now, run latex, then exceltex and latex again. |
| 90 |
|
| 91 |
The \inctab command does nothing else than provide the requested cells |
| 92 |
in LaTeX' tabular format - colums are separated with a '&', each line |
| 93 |
is endet with a line break (\\). This gives you a maximum of |
| 94 |
flexibility and the freedom to use whatever tabular package you want. |
| 95 |
|
| 96 |
|
| 97 |
Currently one package option is supported. |
| 98 |
\usepackage[cellrefs]{exceltex} will write cell data to files named by |
| 99 |
filename, workbook and cell instead of sequentially numbered files. |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
PROBLEMS |
| 105 |
|
| 106 |
* Exceltex cannot read Excel files created by Spreadsheet::WriteExcel |
| 107 |
(see Spreadsheet::ParseExcel documentatin for details). |
| 108 |
|
| 109 |
* Workbook names must not include problematic characters (LaTeX |
| 110 |
control Characters) (^,_,$,%,&,!). Just use Letters, Numbers and a |
| 111 |
Minus as spearator. |
| 112 |
|
| 113 |
* when using the cellrefs package option, whitespaces are also |
| 114 |
forbidden in workbook names and filenames. These are LaTeX |
| 115 |
limitations, i think. |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
HOW IT WORKS |
| 122 |
|
| 123 |
The first LaTeX run writes an entry for each \inctab, \inccell command |
| 124 |
to a spearate index file (\jobname.exltx). This index is then read by |
| 125 |
the exceltex helper script, which actually extracts the ordered data |
| 126 |
and writes it to sequentially numbered files in the directory |
| 127 |
\jobname-exltx. The \inctab and \inccell are then simply including |
| 128 |
these files via a \InputIfExists{} command on the following latex runs. |
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
TODO |
| 134 |
|
| 135 |
Support for other formats than excels would be appreciating. There is |
| 136 |
maybe a chance to get OpenOffice Calc working. There is now a module |
| 137 |
OpenOffice::Parse::SXC on cpan which could to the job for Openoffice, |
| 138 |
but it seems quite new and is not includeded in Ubuntu yet. On the |
| 139 |
other hand, support for different fileformats would yield a naming |
| 140 |
problem, at the time i started with exceltex (in 2004) there was only |
| 141 |
Spreadsheet::ParseExcel, so the name exceltex .... |
| 142 |
|
| 143 |
|
| 144 |
The newest version of Exceltex is available at the following url: |
| 145 |
http://www.physik.uni-freiburg.de/~doerr/exceltex |
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
COPYING |
| 151 |
|
| 152 |
exceltex is Copyright 2004-2006 by Hans-Peter Doerr |
| 153 |
<[email protected]> |
| 154 |
|
| 155 |
This is free software; see the source for copying conditions. There |
| 156 |
is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A |
| 157 |
PARTICULAR PURPOSE. |
| 158 |
|
| 159 |
exceltex is distributed under the terms of the Gnu General Public |
| 160 |
License (GPL) Version 2. See COPYING for details. |
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
README for exceltex version 0.5.1, Apr 30, 2006 |