Calc2LaTeX - Macro for converting Calc spreadsheets into LaTeX tables


Warning message

This extension was not updated recently. It might not work with latest versions of OpenOffice.

Primary tabs

Calc2LaTeX Sourceforge site

Average: 4 (13 votes)

Tables, extension, calc, extension, table, extension, latex, extension, macro, extension, convert, extension, spreadsheet, extension, conversion, extension, tabular, extension
Source code:
Post date:
Friday, 12 December, 2008 - 04:10
Week: 117 - Month: 555 - Year: 7,446 - Timeline
Download extension
System Independent version - All releases
Compatible with OpenOffice 4: Unknown
User feedback:
Compatible with OpenOffice 4.x?

Calc2LaTeX is an Calc (Spreadsheet) macro for converting tables. It makes making tables on LaTeX very easy.

This extension will allow you to select a region in a spreadsheet, and generate a LaTeX tabular format of the spreadsheet.


Embedding the tabular environment in a table float
Caption on top or bottom
Placement options [htbp], etc.
Horizontal position (center, left, right)
Include/exclude ruled lines in table
Include formatting (bold, italic)
Escape special characters (#, $, %, &, _, {, })
Output to a results window or to a file
Horizontally and vertically merged cells (uses multicolumn, but not multirow)

The code was taken from, installed in 3.0, and exported as an extension.

Calc2LaTeX - Macro for converting Calc spreadsheets into LaTeX tables

Version Operating system Compatibility Release date
0.2.4 System Independent, Windows, Solaris Sparc, Solaris x86, Linux, MacOS X, Linux x86-64 3.4 13/12/2008 - 17:35 More information Download


I have not been able to export a chart to latex. Am I missing something or is there some other technique I need to use? Thank you.

Hi there,

Great extension, thank you!!... Just one comment or two.

When you use conditional formatting and it is active (meaning, that what you see is actually the result of some condition met and therefore watching the conditional format and not the original), the extension still export the "base" format and not the one that you are watching. I think I would be nice to export the one you are watching.

The question concerns the speed. I am exporting tables of 11x10 (which I think it is not to much) and it takes some time (a minute?). I know it is not much, but I find this weird...isn't it?

Thanks again!!



I have to cope with very long tables which span over several pages. Today I have to modify by hand the latex code produced by Calc2LateX into longtable format. It would be very usuful to have this longtable option available in the dialog window of Calc2LaTeX together with the option for first row repetition at the beginning of each next page.

Thank you in advance .


Thanks for the great extension.

I have a question: when I create latex code with the "Ruled Line" option on, _all_ cells are enclosed in boxes, whereas when I turn it off, I get no lines at all, even if I have added a border to a row of cells.

Is there any way to tweak the extension to allow for an intermediate setting, where only cells that have been formatted with a border get lines?

Thanks again.

I just downloaded & tried your extension. It works very fine, giving perfect results.
Please note :
- a button would be really useful
- the macro also works on Linux (and OSX I suppose), so you shouldn't restrict it to Windows.

I couldn't figure out (read: didn't take the time yet) how to include the button and menu entry in the extension, but it is pretty easy to do in the interface.

To add a toolbar button (or Menu item):

Tools -> Customize -> Toolbars (or Menu to add a menu item)
Select the toolbar you want to add the button to, then click "Add..."
Scroll down to expand " Macros" in the left pane.
My Macros -> Calc2LaTeX -> Calc2LaTeX
Then select "Main" in the right hand, and click Add
Back in the Toolbars (or Menus) tab, select Modify, and Rename to Calc2LaTeX
I changed the Icon to something that looks like a table.

If someone knows how to include the menu item and/or the toolbar button in an extension, let me know and I'll update the extension.

after selecting the area of the table, what do we have to do to convert in latex syntax?
[Ed: links removed as unrelated to]

I find making tables in LaTeX painful and error-prone. This macro makes it blindingly simple.

Let me know if you have problems installing or running it. This is my first extension, so I expect there to be at least a little trouble, and I would enjoy figuring out the system to make it work.

Wow. I was amazed by how quick and painless this is. It really made my day. You rock, and the tables look great.

after selecting the area of the table, what do we have to do to convert in latex syntax?

UGG, dernière mode de nos jours! Vu lourdes et de style laid, les Bottes UGG n’enchante du premier coup personne. Pourtant, grâce aux stars, elles deviennent tout de suite à la mode en Europe, aux Etats-Unis, au Japon...même dans le monde entier. En faite, les UGG Pas Cher doivent son origine aux chaudes bottes pour les surfers australiens après surf. Et après, elles sont exportées aux Etats-Unis, s’y répandent progressivement. Actuellement,
comme dit le président de Ugg France, ce sont de bonnes chaussures une fois portées, vous ne voulez plus vous déchausser! Enfin, l’originalité, la crédibilité et la confort de luxe... UGG, une légende de nos jour!

Select the cells in the spreadsheet that you want to put into LaTeX syntax.

In Calc, go to Tools -> Macros -> Run Macro... -> My Macros
Expand Calc2LaTeX, select Calc2LaTeX, and select Main, then click Run

The settings dialog will come up where you can select how you want the table to be created in LaTeX syntax, and whether the results should be output to a results window (for copy/paste) or saved to a file (for LaTeX import command).

One thing I have done is to add a button so this macro can be run from a toolbar. You can create a button very easily:
Go to View -> Toolbars -> Customize
Select the toolbar you want to add the button
Click Add
Under Category, expand Macros -> My Macros -> Calc2LaTeX -> Calc2LaTeX
Under Commands, select Main and click Add

Under Customize Toolbars, click Modify, Rename "Main" to "Calc2LaTeX", and select an appropriate icon (or create your own).

Some day, I will try to add this button to the extension.