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.

2
  • There is excel2latex. But I've never used it.
    – jon
    Commented Jun 8, 2012 at 15:34
  • I've added a pdfpages answer; typesetting as a LaTeX table however would likely give more pleasant results. A similar question has recently been brought up, but not yet been answered.
    – dgs
    Commented Jun 8, 2012 at 16:24

2 Answers 2

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

2
  • Thanks! Now I just have to try and make it \paperwidth wide
    – Pizzaguru
    Commented Jun 8, 2012 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
    Commented Jun 8, 2012 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .