Edit Links |
Tips /
CopyTablesFromSpreadsheetsCategories: Tips << | Page list | >>Pasting data from a spreadsheet into LyXAs of Lyx 1.5, you can get data copied from a spreadsheet into Lyx using the "Paste Special" command:
-- Zeyn On the mailing list Samar Singh indicated a great and apparently undocumented way to get tabular data inside a Lyx table: 1. open your xls file with gnumeric or open office. 2. Select the requisite number of columns and rows 3. Come back to your lyx document 4. Insert a table which has at least the selected number of rows and columns 5. Go to the cell on your lyx table where you want the top left corner of the section to be placed. 6. Click the middle button on your mouse (if you only have two buttons, press both buttons simultaneously). That should be it. The experts tell me this should not work but unfortunately for the theory, it does for me. samar -- samar j. singh DW added: This does not work for me. I must select Edit -> Paste Special -> Selection, join lines Sudarsun added: This works for me on Ubuntu 16.10, LyX 2.1.4, Gnumeric 1.12.28. Copy table from Gnumeric using ctrl+c and Paste using middle button onto LyX table works like a charm. Kenward Vaughan added: ... it is VERY important that you do NOT instigate any typing in the
table when you do this. If you click in the 1st box of the table and
see a red-bordered box inside, before you click the middle mouse
button, this paste won't work. It will instead paste the whole excel
contents into that one cell.
Simply _position_ the cursor over the cell before ...
I myself have tried this succesfully on Windows with Excel and Lyx 1.3.6 -- and by the way, instead of the middle mouse button sometimes it also worked to paste via menu selection or C-v shortcut (but not always). -- For my Excel 2002 on WinXP and LyX on Win V136-1 it also works by direcly copying the cells from excel, without opening it in openoffice or gnumeric. The only nasty thing is that the last column gets an additional square character. -- Laura Spreadsheet as an external insetNew in LyX 2.0 is the ability to insert a spreadsheet as "external material". This inserts a link to the spreadsheet file in LyX. The spreadsheet is not copied, so if you update the spreadsheet later, the LyX document is updated too. Follow these steps in LyX:
When you print or preview the document, the entire spreadsheet appears in the document. Long spreadsheets will be broken up across page boundaries. Note that it is necessary to have gnumeric installed, even if using excel/openoffice spreadsheets. This is so because the conversion software is part of gnumeric. Make sure that LyX runs as administrator in Windows to allow it to spawn the gnumeric converter. -- Helge Hafting Spreadsheet import from CSV fileYou can easily import tables created by Excel or some other spreadsheet program to a native table in LyX. To do so, just follow these three steps:
A new LyX files opens, containing your table in native LyX format. You can now easily copy this table to your original LyX-file. -- Constantin Ludmann Tables using EPSIn OpenOffice, it is possible to export tables as EPS and include it into Lyx with all the formatting (color, fonts, borders etc) exactly like in OO Calc Follow these steps:
As far as I can tell, this does NOT work for PDF export. How can one export an encapsulated (ie no excess bounding box, no page) PDF version of a table directly? (There are of course other external tools for converting EPS to PDF) See WinGraphics for more EPS related exports Tables using Calc2LatexCalc2LaTeX is an OpenOffice macro to convert OOCalc tables to LaTeX. It works well and is easy to use. You can paste the result in a LaTeX file and then import it in LyX. -- Charles Tables using GnumericGnumeric is a spread-sheet program with a good LaTeX export. Follow these steps:
\def\inputGnumericTable{}
Notes:
\addtocounter{table}{-1}
Otherwise the numbering of the tables is not correct.
+ In the *.tex-file replace the offending question marks with the character string "\EURtm".
+ In your LyX document add
+ Go to --Marcus (creator) and Ross (updater) Insert a table as a pictureThe paste special command, described above can be also used to insert a table as a picture (either as PNG or JPEG).
Three things:
--Ilja To use math mode in Gnumeric tables you need to pass LaTeX code directly without any changes. To achieve that you need to wrap your LaTeX code into \L{} or \l{} (I don't know the difference). For example to get Mass–energy equivalence you need to have this code in the cell: --Roman Inflianskas Tips |