Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
There is excel2latex. But I've never used it. –  jon Jun 8 '12 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 Jun 8 '12 at 16:24

2 Answers 2

up vote 3 down vote accepted

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

share|improve this answer
    
Thanks! Now I just have to try and make it \paperwidth wide –  Pizzaguru Jun 8 '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 8 '12 at 20:07

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.