Home » excel » excel – Extracting a shape from a chart

excel – Extracting a shape from a chart

Posted by: admin May 14, 2020 Leave a comment

Questions:

Let’s assume I have a have a scatter smoothed line chart on an Excel spreadsheet like the next one:

Fisher Transformation

Is there a way to extract the function line from the chart? As a shape?

Extracting the function shape from the chart

Probably the solution (if there is one) is with a VBA routine and that’s fine by me. However I don’t have any code to show you, because I don’t really know how I could start solving this.
If anyone could just point me on a solving direction, maybe I’ll figure it out.

How to&Answers:

Select the chart.

On the Home tab of the ribbon, click the dropdown next to Copy, and in the dropdown menu, choose Copy as Picture…

In the dialog, keep the defaults (especially Picture and not Bitmap) and click OK.

Paste elsewhere on the worksheet.

Right click on the pasted picture, and choose Group > Ungroup. Click on Yes to convert the picture to a grouped collection of shapes.

Right click again on the converted picture, again choose Group > Ungroup.

Press Esc to unselect everything.

Click on the curved line and drag it to where you want it.

Answer:

Well, I think I’ve found some kind of solution.

First, as you were said, you could write some code to get rid of all that stuff that is not necessary.
Then, you can save that chart to emf with that code
(Excel export chart to wmf or emf?)
Then write some code to insert that created emf and crop it a bit inside excel, so there are no borders etc.
Last, remove that picture from hard drive.

I think it could work for you and it shouldn’t be hard.

You can then even extract that line itself in Inkscape (which is not possible if you simply copy that and paste).

I don’t know much about programming but maybe there are some nice free libraries to edit .emf files to extract that line, so it would then do exactly what you want. (Or using inkscape in command line from inside excel http://www.inkscapeforum.com/viewtopic.php?t=32652)