[Tex/LaTex] Add pdf/excel to appendix

landscapelongtable

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.

Best Answer

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