Jump to content
You must now use your email address to sign in [click for more info] ×

How to paste a vector graph into Affinity PC


Recommended Posts

Any advice on how to copy and paste a vector graph (created in Excel) into Designer?

I can do this in the Mac version without any problem using copy and paste, but the PC version always pastes as an image irrespective of whether I select Metafile, Enhanced metafile or save it as a PDF and try to open the PDF in Designer.

The clipboard will copy and paste the graph between Office Apps retaining it as a vector.

Are there some settings I can change to prevent graphs being converted to bitmap images? 

Edited by H-Mark
Link to comment
Share on other sites

Well on Win the Excel clipboard formats are restricted here to certain types (bitmap, pict, etc.), see:

With a little bit of MS VBA (VisuaBasic for Applications) programming in Excel, one could try out directly what is placed then into the Clipboard, see for example ...

aFmts = Application.ClipboardFormats 
For Each fmt In aFmts 
 If fmt = xlClipboardFormatPICT Then 
    MsgBox "Clipboard contains a picture" 
 End If 
 If fmt = xlClipboardFormatBitmap Then 
    MsgBox "Clipboard contains a bitmap" 
 End If
 ' ...
 ' ... add on demand other If checks for other 
 ' ... clipboard format types into the loop
 ' ...
Next

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

2 hours ago, v_kyr said:

Well on Win the Excel clipboard formats are restricted here to certain types (bitmap, pict, etc.), see:

With a little bit of MS VBA (VisuaBasic for Applications) programming in Excel, one could try out directly what is placed then into the Clipboard, see for example ...


aFmts = Application.ClipboardFormats 
For Each fmt In aFmts 
 If fmt = xlClipboardFormatPICT Then 
    MsgBox "Clipboard contains a picture" 
 End If 
 If fmt = xlClipboardFormatBitmap Then 
    MsgBox "Clipboard contains a bitmap" 
 End If
 ' ...
 ' ... add on demand other If checks for other 
 ' ... clipboard format types into the loop
 ' ...
Next

 

Thanks for your help.

When I run the VBA macro in Excel it identifies the copied graph (a histogram) on the clipboard as a picture (i.e  it only executes the If fmt = xlClipboardFormatPICT line)

On the Mac version it will Paste into Designer as a fully editable vector drawing, each bar can be resized, moved, change pattern etc.

In contrast, doing exactly the same process on the PC version it always ends up as an image.

All of the Paste Special options also end up as an image.

However, if I then paste into PowerPoint without clearing the clipboard it pastes as an editable Microsoft Excel Graph Object, not as an image so the vector information I am assuming is still there. It appears like Designer running in the Windows environment ignores the format of the object on the clipboard and if it is not text then assumes it is a bitmap.


I think I will have to get my students to email me their spreadsheets (usually very large) so I can copy and paste the histograms into AD files on my Mac and then email the files back to them. They are able to open the Mac generated AD files on their PC version and edit them as normal. 

 

 

Link to comment
Share on other sites

Don't know but it might probably have to do with this here on Win ...

I seldom use Office on Win and when mostly very old versions.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Unfortunately I get the same image pasted format regardless of whether in Designer, Pixel or Export personas (oddly in export mode it draws a rectangle with a heading PNG in RGB).

The PC is running Windows 10 and Office 2016 and I have the latest Affinity Designer

 

This is an example of the Histogram I'm trying to copy from Excel

Gene changes histogram.xlsx

 

and this is one of the styles I'm wanting to end up with in AD

 

1897902190_ScreenShot2020-01-13at2_16_24am.thumb.png.11bea6f174035c7eb4e471554e487502.png

 

Edited by H-Mark
Link to comment
Share on other sites

It looks like my problem is to do with the fact it is a Histogram I am trying to copy (doesn't work in Windows, but does in OS X).

If I make a simple bar graph, like Lagarto's, it will indeed copy and paste as a vector into AD in Windows without any problems, but the Histogram style of chart always converts to an image.

 

I will figure out a way to get the histogram converted to a column chart and problem solved.

Thanks much for all your help.

Link to comment
Share on other sites

14 minutes ago, Lagarto said:

On macOS, all these additional chart types seem to be exported as vector format, so this is really a strange omission. It does not seem to be a bug but simply something that is not implemented for new graph types on Windows platform... .

Despite the fact that most apps reuse the OS related/provided clipboard service for these actions, it's possible that this specific chart contains certain none vector elements/objects then. So the whole may then be treated as a bitmap instead, in order to offer more visable transfer compatibility and equal representation capabilities between applications. Though it then usually should behave on MacOS equally as a bitmap which, AFAI understood, it doesn't and is vector there instead.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Can a modern Office version (those 365 etc.) handle SVG transfer, meaning do they nowadays support SVG generation? - If yes, there are probably also Excel/Office related C#/VB lib routines to force a copy (Excel cell whatever) to clipboard then in SVG format, which can be used in macros.

Update: In the meantime I saw ...

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

That's a workable solution

5 hours ago, Lagarto said:

A good call. I pasted the histogram from Excel into PowerPoint, that lets save individual slides in SVG format, and here everything is kept in vector format, which can then be opened in Designer, see attached. However, saving the same slide in PDF format still produces a rasterized image.

 

Copy/Paste --> PowerPoint --> Save as SVG is a great solution.

I had no trouble opening in AD and after remembering to "ungroup" was able to edit all the bars etc.

 

Smiley face, problem solved.

Thanks for taking the time to figure it out, much appreciated.

 

Link to comment
Share on other sites

2 hours ago, H-Mark said:

Copy/Paste --> PowerPoint --> Save as SVG is a great solution.

That's what the above referenced/linked Office-Watch article from 4 September 2019 adviced ...

Quote

PowerPoint only, for now

Save as to SVG is only in PowerPoint, at least for the moment.

It would be nice if Word had the same feature to export images in documents.  In the meantime, copy the image from Word to PowerPoint and ‘Save As’ from there.

... namely if Word/Excel can't do it, try from PowerPoint. - Seems not all Office apps do share the same export features then.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.