# From LibreOffice Calc to LaTeX - exporting tables and graphs [duplicate]

Is there any easy way to export/convert LibreOffice tables & graphs to LaTeX format?

EDIT

this website allows you to paste the data and generates LaTeX formatted tables.

CALC LOOKS LIKE THIS:

## marked as duplicate by CarLaTeX, Stefan Pinnow, TeXnician, Schweinebacke, JesseAug 26 '17 at 7:58

• Also the graphics package could be useful: tex.stackexchange.com/a/39446/101651. – CarLaTeX Aug 26 '17 at 5:07
• The solution, in my option, is to export the pdf from Calc and then include it in your LaTeX document with \includegraphics, as indicated in the answer I linked before. You can set the width=<width> and/or the height=<height to fit it into your LaTeX document. Look at the graphics or graphicx package documentation: ctan.org/pkg/graphicx. – CarLaTeX Aug 26 '17 at 5:32
• You can crop your pdf with the trim option: tex.stackexchange.com/a/57420/101651 – CarLaTeX Aug 26 '17 at 5:49
• I think there's no problem, then, there is also the option page where you can choose the page to include with the command – CarLaTeX Aug 26 '17 at 6:08
• @HernanMiraola no, it is desktop software so it would provide an offline solution. But the end result would be about the same I think. – scottkosty Aug 26 '17 at 6:11

See this example:

\documentclass{article}
\usepackage{mwe}

\begin{document}
\blindtext
\begin{center}
\includegraphics[page=1,trim=10 400 0 100, clip, width=\linewidth]{yourpdf.pdf}
\end{center}
\blindtext
\end{document}


Where yourpdf.pdf is a file with this two pages:

And the result of my MWE is:

The values to use in the trim option depend on your document and images, from the package documentation:

trim Similar to viewport, but here the four lengths specify the amount to remove or add to each side. trim= 1 2 3 4 `crops' the picture by 1bp at the left, 2bp at the bottom, 3bp on the right and 4bp at the top.

With some trial & errors, you can find them easily.