Liviu Andronic <landronimirc <at> gmail.com> writes:

> 
> On Fri, Oct 22, 2010 at 2:48 AM, Pavel Sanda <sanda <at> lyx.org> wrote:
> > Liviu Andronic wrote:
> >> If I understand correctly your question, it has been discussed several
> >> times in the past and there was even a patch integrating Gnumeric into
> >> LyX. But I think that it never got applied and that the request is
> >> frozen at the moment. [1]
> >
> > the last message in thread is still valid ;)
> > pavel
> >
> [1] Oh, well, crossing my fingers, perhaps Helge has something new on
> this front. :)
> Liviu
> 
> [1] http://www.mail-archive.com/lyx-devel <at> lists.lyx.org/msg160372.html
> 

Obtain and install the exceltex package from CTAN. Exceltex consists of a macro
package as well as a stand-alone executable. Read its instructions for proper
installation.

Preferably (not required, but makes life easier) use evince as your PDF viewer
in LyX.

Add the line: \usepackage{exceltex} to the LyX document
preamble. <document><settings><latex preamble>

Identify a cell in a .xls spreadsheet desired for linking to LyX.

Insert ert into LyX as follows:

\inccell{<full path to spreadsheet>/file_name.xls!sheet_name!cell_reference}

for example:

\inccell{/home/administrator/Desktop/111005ar.xls!Sheet1!A1}

Click on the 'view' icon in LyX (assumes version 2.0).

>From Evince, elect '<file><open containing folder>. This will show you the path
to the temporary files LyX produces.

Open a terminal (command line interface)

Change directory to the directory containing the .tex temporary file LyX
produces.

Run pdflatex against the .tex temporary file LyX produces. For example: pdflatex
newfile1.tex

Run exceltex against the .tex temporary file. For example: exceltex newfile1.tex

Run pdflatex against the .tex temporary file again.

Go back to LyX and continue your editing session. The links will all work
properly throughout (current) LyX editing session.

If you link more cells, cell values change, or if you start a new LyX session,
repeat the above steps for proper linking and display.

Linking tables involves a similar procedure as follows:

ert: \begin{longtable}{ll} (or whatever column specification is needed) ert:
\inctab{/home/administrator/Desktop/111005_ar.xls!AR!A1:C3} ert: \end{longtable}

LyX: View (icon) Evince: <open folder containing> Command: cd
/tmp/lyx_tmpdir.TJ3347/lyx_tmpbuf2 Command: pdflatex newfile1.tex Command:
exceltex newfile1.tex Command: pdflatex newfile1.tex

Return to LyX session.




Reply via email to