cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Does any know how to extract a MEGA diagram into an Excel spreadsheet?

CDock
Contributor

I have a batch program that creates an Excel spreadsheet with multiple worksheets. I need to extract a copy of a diagram into a worksheet. This obviously works with Word documents generation but I have no idea how this might work with Excel. Any help/advice gratefully received.

7 Replies

Hi. Apologies as didn't see your alternative. I'll investigate that method also.

Thank you.

Many thanks for your help Jerome.

I'll give that a try.

Have a good weekend.

Craig

See API SaveAsPicture in documentation

See also KB 00002518

 

 

Jerome

Hey! That sounds just the job. Any idea where I may find an example? I cannot see any reference in the API manual.....

There is a method saveasimage for a diagram if I remember correctly. That is what I would do and then import it in the excel document

Hi Jerome.

We meet again! Thank you for the interest in my issue. 

Basically, I have a VB batch program that creates an Excel Workbook with different sheets for Data Model information. I have bee asked to display the MEGA diagram as an image in one of the sheets. I have a work around in that our web site generation builds pages showing the diagrams. The generation process creates image s in the Images folder. I'm using "ExcelSheet.Shapes.AddPicture" passing the image file name. This seems to work but is not quite what I was wanting. I was hoping there was a "GetImage" method! 🙂  

jhorber
MEGA
MEGA

Hello

 

What do you mean by extract a MEGA diagram to Excel

A diagram is a complex information:

  • Diagram object itself with string and text properties (name, comment..)
  • Diagram property _drawing (in the binary format): contains the graphical arrangement
  • Diagram type/nature: specifies the type, implementation varies with version
  • Links between diagram and objets described on the diagrams + these objects
  • Links to described objet + this object

Excel export wizard in primarily designed to export objects with string and text properties.

If the property _drawing can be fully exported, you can consider to use Excel export but this will be very delicated.

Besides, the diagram drawing will not be displated as in HOPEX: it would be a long binary string. 

Jerome