On 26. jan. 2012 16:11, Fred wrote:
Helge Hafting<helge.hafting<at>  hist.no>  writes:


On 10. sep. 2011 16:14, Christian Wilhelmsen wrote:
Hi!

When trying to import and .xls or .gnumeric to LyX 2.0 I get the error
message:

"no information for converting gnumeric format files to latex.
Define a converter in the preferences".

I understand what it asks of me, but I can't seem to figure out how to
define the converter.
I have installed gnumeric on my computer.

You should not need to define a converter, LyX supports "ssconvert"
which usually comes with gnumeric.

Is the ssconvert program in your PATH? If LyX cannot find ssconvert,
then the conversion from gnumeric to latex won't work. Because ssconvert
does that job.

Hi Helge,

I do get the same error message as Christian. How do you actually "Define a
converter in the preferences" of Lyx? ssconvert has been installed with gnumeric
(1.10.16), though Lyx is unable to find the path. And I am to stupid to define
exatly that particular path.

Sorry for the late answer - I have been away from the mailing list for some time.

There are two ways of fixing this problem.

1. Change the system PATH
=========================
The first is to change the PATH setting, so that "ssconvert" can be found automatically. I.e. find out what directory "ssconvert" resides in, and add that to PATH.

(You should then be able to type "ssconvert"
at the command line, and get a message from the program instead of an "unknown command" error.)

The change is done outside of LyX, different operating systems have different ways of setting up the PATH. I guess you are not on Linux, because on Linux, ssconvert is always in the PATH.

After this, use the menu "Tools->Reconfigure" in LyX, and the converter will be found and "just work".

2. Change the preferences in LyX
================================
The other way is to change the converter in the preferences. This way you won't need to mess with the system PATH setting.

In LyX, use the menu "Tools->Preferences". In the dialog, click
on "File Handling" and then "Converters".

You get a list of converters, one of them should be named
"Excel spreadsheet -> LaTeX(plain)" click on it.

The "Converter:" field should now contain this:
ssconvert --export-type=Gnumeric_html:latex $$i $$o

Now, replace the word "ssconvert" with the complete path to the ssconvert binary. On my linux system, this would be
/usr/bin/ssconvert
so the complete line would become
/usr/bin/ssconvert --export-type=Gnumeric_html:latex $$i $$o
If you are on windows, this might be something like
C:\programs\gnumeric\ssconvert
instead, and then the complete line should be
C:\programs\gnumeric\ssconvert --export-type=Gnumeric_html:latex $$i $$o

Note that it probably isnt _exactly_ c:\programs\gnumeric\ssconvert
Search your disk(s) to find out exactly where the ssconvert program is installed - don't assume my examples are perfectly correct!

How you search the disk depends on your operating system.
Linux/mac:
open a terminal window, the command is:
find / -name ssconvert

windows:
Use some GUI utility, or run "cmd.exe" and give these commands:
C:
cd \
dir /s ssconvert*.*

If this yields no result, repeat but use D: instead of C:, and so on for the rest of the alphabet. Well, only for disks you actually have.

Helge Hafting

Reply via email to