-----Original Message-----
From: Helge Hafting [mailto:helge.haft...@ntnu.no] 
Sent: Wednesday, August 31, 2016 9:52 AM
To: lyx-users@lists.lyx.org

Den 29. aug. 2016 21:26, skrev Jannick:
> Is it possible to specify the tab name in an .xlsx file to be imported 
> to lyx using gnumeric's ssconvert.exe?
>
> The conversion command
>
>       ssconvert --export-type=Gnumeric_html:latex $$i $$o
>
> picks one of the tabs. I am not sure if ssconvert's -S switch could 
> help here, but I would be curious if a specific tab could be chosen. 
"man ssconvert" on linux gives some information about options you may want to 
investigate:

        -S, --export-file-per-sheet
               Export a file for each sheet if the exporter only supports one 
sheet at a time.  The output filename is treated as a template in which sheet 
number is  substiā€
               tuted for %n and/or sheet name is substituted for %s. If there 
are not substitutions, a default of ".%s" is added.

This one may give you several files. Further options:


OPTIONS FOR THE PORTABLE DOCUMENT FORMAT (*.pdf) EXPORTER
        sheet  Name  of  the  workbook  sheet to operate on.  You can specify 
several sheets by repeating this option. If this option is not given the active 
sheet (i. e. the
               sheet that was active when the file was saved) is used.  
This is ignored if the object option is given.

        object Name of the sheet object to print. If this option is given any 
sheet option is ignored.  Only the first object given is exported.


These options are documented specifically for pdf export, (and a few 
others) This may or may not work for a latex export. Anyway, LyX can 
include PDF into a document too.

Helge Hafting

___________

Thanks, this is helpful. 

To have lyx run the compilation, the issue I am struggling with is how to 
config the file converter (and/or anything else) to pass on (i) the source 
.xlsx file name and (ii) the selected tab name such that for the file converter

1 - $$i is still the original .xlsx file name (like input.xlsx), since lyx 
appears to require this input to be able to copy the source file to a temp lyx 
folder (with $$i as target file name)
2 - $$o is the .tex file name incl. the table name (probably converted by 
ssconvert; like input_FirstTable.tex), since $$o is effectively the temp .tex 
file name lyx


I guess the question behind this is how can we pass two independent arguments 
to the file converter? Does anyone have any idea - or am I missing something 
here? 

Thanks,
J.

Reply via email to