2

I have a large (1 page high, 5 pages wide, in landscape) excel sheet and I want to add it to the appendices of my thesis. Is there a way to convert this to a latex tabular or can I export the excel to pdf and add the pdf content to my appendices? I have tried using the pdfpages but then the page numbering and page header are missing (and there was no margin between the left side of the page and the table).

What's the best best way to do this?

Also, if somebody knows a way to make a landscape longtable across multiple pages together with resizebox, so that the table height is scaled to page height and table width is spanning across multiple pages, then let me know. It seems like this is impossible for LaTeX and the only way to create this effect is with \tiny to scale the content.

azetina
  • 28,884
Pizzaguru
  • 503

2 Answers2

3

You can tell pdfpages to keep a page style with the pagecommand option. Further, since pdfpages internally uses includegraphics and passes on commands, you can also specify a width for the page to be inserted, or e.g. scale it.

\documentclass{article}
\usepackage{pdfpages}
\usepackage{fancyhdr}

\fancyhead[R]{\normalsize\thepage}  
\pagestyle{fancy}

\begin{document}

\includepdf[pages=1,
            pagecommand={\thispagestyle{fancy}},
            width=\textwidth,
            frame]{yourfile.pdf}            
\end{document}

enter image description here

dgs
  • 2,741
  • Thanks! Now I just have to try and make it \paperwidth wide – Pizzaguru Jun 08 '12 at 19:03
  • I'd not recommend it, but you may specify both width and height if distorting the original aspect ratio is an option (e.g. use width=\paperwidth,height=\textheight). – dgs Jun 08 '12 at 20:07
2

OpenOffice.org or LibreOffice have Macro to convert table to LaTeX table. Open Excel table on Calc and convert it.

http://www.ooowiki.de/Calc2LaTeX

MiMo
  • 123