I will be using Microsoft Excel to produce graphs and I was wondering if there was a simple way to put those graphs into a LaTeX document?
[Tex/LaTex] Is it possible to put MS Excel graphs into a LaTeX document
excelgraphs
Related Solutions
The package siunitx
could be a solution for you, but it requires some adjustment of the excel2latex
output, which I'll explain below. siunitx
defines a special column type, S
used in place of the usual l
,c
,r
specifications.
Each cell entry is then taken as the argument to siunitx
's \num{}
command, which accepts scientific notation input as 1.00E-02.
One behavior of this solution is that siunitx
centers the columns around the decimal separator. siunitx
tries to be smart about what is text/headings and what is numerical data. But anything that could be mistaken for numerical data (in your example, the first row, which I'm assuming contains headings) should be protected with curly braces.
So, to apply this solution to excel2latex
output, you'll have to:
- load the
siunitx
package in the document preamble, - change column specifiers from
c
(orl
orr
) tos
in the beginning of thetabular
environment for any columns with numerical data, and - protect any non-numerical data that shouldn't be aligned at the decimal separator with curly braces
{}
.
An example:
Before:
\begin{tabular}{cc}
1 & 2 \\
1.00E-02 & 1.05E-03 \\
\end{tabular}
After:
\begin{tabular}{SS}
{1} & {2} \\
1.00E-02 & 1.05E-03 \\
\end{tabular}
Complete Code and Output:
\documentclass{article}
\usepackage{siunitx}
\begin{document}
\begin{tabular}{SS}
{1} & {2} \\
1.00E-02 & 1.05E-03 \\
\end{tabular}
\end{document}
Many adjustments can be made for alignment and spacing of the S
columns. If you decide this solution is workable for you, you can consult the package manual (Section 4.6) for details.
Using such a complex route as you describe will result in multi step degradation.
1) Open your target in its own application (here it is excel)
2) Zoom in to fill the screen with the full amount of a crisp image as you require (with some applications you can zoom 200% for example)
3) Use a snipping tool if available or more simply press Print Screen button (Tip use Alt + Print Screen buttons at the same time on the focused window will only capture that window)
4) Open MS Paint or 3D Paint and "paste" the resultant screen
5) Crop and resize to your desired shape (avoid rescaling in odd steps use say 50% or 25%)
6) Save as whateveryoulikefilename .PNG format in the same directory as your .tex file
7) Include PNG graphics with \includegraphics[scale=1.0]{whateveryoulikefilename}
If the scale is to big or small you can readjust it in paint or in the command above.
NOTE the above method is for simply transfer as a pixel image.
If you wish to have embedded tables you would need to use an excel add-in such as https://ctan.org/tex-archive/support/excel2latex/
Best Answer
You can put the graph as a seperate document tab (opposed to inside a sheet). Then you can print it to PDF, using either some installed PDF printer or the Office built-in PDF printer. Then you can include the graph using the package
graphicx
and the command\includegraphics[width=\linewidth]{graph.pdf}
.You can as well download the TeX fonts as OTF and use them in Office, achieving the font consistency. The basic Computer Modern can be gotten here in the renewed version Latin Modern:
http://www.gust.org.pl/projects/e-foundry/latin-modern/download