RE: Importing specific tab of .xlsx file to lyx?

2016-09-07 Thread Jannick
Original Message-
Sent: Tuesday, August 30, 2016 5:10 PM

On 08/29/2016 03:26 PM, Jannick wrote:
> 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. 

Someone here may know, but you might better try asking on some
Gnumeric-related list.

Richard

__

Thanks. ssconvert as of now (version 1.12.31) is already able to extract
from an Excel spread sheet tabs per tab name such that, say, ssconvert
creates the .tex files with names 'xlsxname__tabname.tex'. 

To take the next step the question would be: How can lyx be told to import
this very .tex file thru the file import handler for external gnumeric/Excel
material. In other words: can that be achieved by simply amend ' ssconvert
--export-type=Gnumeric_html:latex $$i $$o' or anything else needed here
(since the information  and  would be needed separately if
I correctly understand the compilation procedures preparing external
material)?  

Any help highly appreciated, where I would like to use lyx to type the
document and have it compiled (in contrast to any other solution fiddling
around with the files outside of lyx).

Many thanks,
J.



RE: Importing specific tab of .xlsx file to lyx?

2016-08-31 Thread Jannick
-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.



Re: Importing specific tab of .xlsx file to lyx?

2016-08-31 Thread Helge Hafting



Den 29. aug. 2016 21:26, skrev Jannick:

Hi,

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. Certainly,
as workaround the tabs could be split to a number of .xlsx files, however,
this is not very practicable if the tabs depend on each other
calculation-wise.

"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


Re: Importing specific tab of .xlsx file to lyx?

2016-08-30 Thread Richard Heck
On 08/29/2016 03:26 PM, Jannick wrote:
> Hi,
>
> 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. Certainly,
> as workaround the tabs could be split to a number of .xlsx files, however,
> this is not very practicable if the tabs depend on each other
> calculation-wise.  

Someone here may know, but you might better try asking on some
Gnumeric-related list.

Richard



Importing specific tab of .xlsx file to lyx?

2016-08-29 Thread Jannick
Hi,

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. Certainly,
as workaround the tabs could be split to a number of .xlsx files, however,
this is not very practicable if the tabs depend on each other
calculation-wise.  


Living on Win10 with LyX 2.1.5 and cygwin's ssconvert 1.12.31.

Many thanks for your advice,
J.