# How do insert a pdf or excel spreadsheet neatly?

I have a rather complicated excel-spreadsheet with calculations. I would like to insert this into my document so it looks quiet neat. It easily fits one page with title, caption, etc. I tried converting it to pdf and using:

``````\section{Calculations}
\subsection{Preliminary Calculations}
\includepdf[pages={1},fitpaper=true,picturecommand={!h}] {../NominalCalculations.pdf}
``````

However this does not give me the desired result. It creates one page with the section title and subsection title, then leaves a massive amount of white space and creates a new page for the pdf file. The pdf file has enough space to fit title and sectiontitle above it. How do I get them on one page? How do I caption it as a table? How do I display the LaTeX document page number on the page?

• When you insert a pdf using `\includepdf` you are inserting a page not an image. So if you want to insert the PDF as part of your document like an image, use `\includegraphics` from the `graphicx` package. Then the page will be a regular page of your document, and will be numbered correctly also. – Alan Munn Feb 10 '16 at 16:34
• Just put the `\includegraphics` command inside a `{table}` environment. – Alan Munn Feb 10 '16 at 18:03
• But really you should probably not format tables in Excel but use LaTeX to do them. If you save the unformatted Excel data as a CSV file you can easily import it and format it using `pgfplotstable`. See How typeset a numeric table from a CSV file and also also Comprehensive list of tools that simplify the generation of LaTeX tables and – Alan Munn Feb 10 '16 at 18:57