On 10. des. 2010 21:43, Liviu Andronic wrote:
On Wed, Dec 8, 2010 at 5:11 PM, Helge Hafting<helge.haft...@hist.no>  wrote:
Spreadsheets are imported as longtables, so a spreadsheet longer
than a page will still work fine.

I was going to request an option for importing the spreadsheets as
normal tables, for potential inclusion in floats, but I'm very
surprised to find out that longtables can live in floats (even though
the caption numbering gets messed up). Am I missing something?

A longtable can work in a float. This is normally pointless, because the
single big feature of a longtable (over normal table) is that a longtable can be broken up across page boundaries. And material inside a float is never ever broken up, so there is normally no need for a longtable in a float.

In this case, we also have the limitations of the ssconvert utility.
I have looked a bit more at it. It can produce many formats, several may be interesting for LyX:

Gnumeric_html:latex
===================
Currently used. Gnumeric creates a latex document with a single
longtable containing all spreadsheet cells.
* Fonts are controlled by LyX, for that consistent look.
* Spreadsheet controls some font attributes, like italic/bold/color
* Lines controlled by spreadsheet, but limited to what is "easily
  available" in tex.
* Don't support every feature you can cram into a spreadsheet,
  for example double underlining. And I doubt you'll get
  any diagrams.
* There are some currently unused features. The converted file
   contains fields where one may insert running headers for
   multipage lists. Lyx could probably take advantage of this.

In short: You get your data displayed, but not exactly the same
way as if you print the spreadsheet. Instead, it fits the LyX layout better.


Gnumeric_html:latex_table
=========================
This one creates what they call a "table fragment". No preamble,
not even a \table command. Just the text and cell separators that goes inside a \table command.

* Adding support does not seem hard, but is it useful?
* No lines or font attributes - just the text!

Does not seem useful for the "external inset". Maybe useful if we want to copy-import a spreadsheet into a LyX table? But that is a different feature.


Gnumeric_html:html40
====================
Possibly interesting when exporting a LyX document to
html, and the document contains a spreadsheet?


Gnumeric_stf:stf_csv
====================
Comma-separated values. Possibly interesting when converting a LyX
document to text, and the document contains a spreadsheet?


Gnumeric_pdf:pdf_assistant
==========================
* Creates a pdf of the spreadsheet
* May result in a multi-page pdf
* All formatting controlled by spreadsheet

Possibly interesting for including single-page spreadsheets
that have diagrams and such. But you can get the same by
saving a pdf from the spreadsheet, or use a "print-to-pdf" facility.

Helge Hafting

Reply via email to