Office clipboard format

2020-07-13 08:16发布

问题:

If I copy a graph from Excel (2007) and choose Paste Special in another Office app, I see a clipboard format called "Microsoft Office Graphic Object", which allows different customizations than Enhanced Metafiles. How do I create such a clipboard object from my own (C++) app so it gets the first-class treatment from Office app?

It's not so important that the chart data be linked like it is within Office apps -- I just want to offer another graph export option.

ClipSpy reports several binary formats including "Excel 2007 Internal Shape", "Embed Source" and "Art::GVML ClipFormat". I guess these are proprietary and private, but in case anyone knows of docs, please let me know.

回答1:

Its actually a zip file (the data begins with PK), if you save the data (using ClipSpy) you be able to open it with your preferred zip program.

Poke inside and you find out that the data is an open XML format which is not too cryptic.



回答2:

I would guess that the format is documented in the specs MS was made to release as part of its anti-trust ruling.

Unfortunately, you'll have to read and try to understand them, they're not pretty.