cancel
Showing results for 
Search instead for 
Did you mean: 

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

Occasional Contributor

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

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
MEGA

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

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
Occasional Contributor

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

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! Smiley Happy  

Highlighted
MEGA Partner

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

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

Occasional Contributor

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

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

MEGA

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

See API SaveAsPicture in documentation

See also KB 00002518

 

 

Jerome
Occasional Contributor

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

Many thanks for your help Jerome.

I'll give that a try.

Have a good weekend.

Craig

Occasional Contributor

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

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

Thank you.