1

How to insert excel figures to LaTeX, I tried the following method but figure resolution too bad:

Step 1. Copy and paste the graph. Copy/paste your Excel graph to Visio. Be sure that it is pasted as Microsoft Office Excel Worksheet (this should be the default, but it can be ensured using the Paste Special option instead of Paste).

Step 2. Remove blanks spaces around the graph. Go to Design tab, then find Page Setup, go to Size and choose Fit to Drawing. This removes everything but margins. To remove margins, open the Page Setup (click on the small icon in the bottom right corner of this ribbon area), go to Print Setup tab, click on Setup and set the margins (it seems that the left margin cannot be set to 0, at least not using this approach). Then click OK twice.

Step 3. Create the PDF file. Now go to File, then Save As, from the Save as type list choose PDF. Click Options, adjust the options, then click OK and finally Save. Now there should be the PDF file with the graph.

Step 4. Import this PDF file into a LaTeX document. For this, the \includegraphics command should be used.

  • 3
    Can't you just export the image directly from Excel? Save as -> pdf? Maybe? I haven't used Excel in a few years. – Johannes_B Jan 9 at 10:46
  • 8
    You could export the data as csv and plot your image with LaTeX. Have a look at pgfplots. Example – Johannes_B Jan 9 at 10:46
  • Instead of using Visio to produce the pdf, you can use some pdf printer (like bullzip), which once installed, will enable your Excel figure to be "printed" as pdf into the directory containing your tex file. Then just follow your Step 4. – Partha D. Jan 10 at 5:56
2

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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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