SVG file is not Import in excel sheet

Hi Walter,

I have requirement show an image in excel sheet. I downloaded graph as SVG format but in excel sheet svg image is not display.

If I download image as ‘JPG’ or png then graph is not download completely.

How do you insert the SVG produced by Diagram.makeSvg into a spreadsheet?

We have some open library like ExcelJs . So we can make excel file dynamically.

My problem will be resolved if I can download graph in PNG or JPG format.

But condition is graph should be download completely.
Please try this at your end for at least 70 nodes

When I get some free time later today or tomorrow I can develop a sample for you.

How do you call Diagram.makeImageData?

As per your example

Could I please see the call?

Does not make sense ? What does you want ?

I would like to know what argument values you are passing to the call.

I cannot answer questions usefully unless I know exactly what you are doing, what results you are getting, and what you want instead.

Hi Walter,

Below code is not working if we have 70 + nodes .
myCallback(blob) {

  var url = window.URL.createObjectURL(blob);

  var filename = "myBlobFile.png";

  var a = document.createElement("a"); = "display: none";

  a.href = url; = filename;

  // IE 11

  if (window.navigator.msSaveBlob !== undefined) {

    window.navigator.msSaveBlob(blob, filename);




  requestAnimationFrame(() => {;





makeBlob() {

  var blob = myDiagram.makeImageData({ background: "white", returnType: "blob", callback: myCallback });


Try setting scale: 1, in the options.
Depending on the Diagram.documentBounds, you may also have to set the maxSize option.
If the document bounds are too big, it might not be realistic to render a single bitmap image.

I tried set scale:1 but image could not complete download , partial image downloaded .
you can check at your end … and if we will do first zoom and then download then again only some portion of image is downloading.

What are the largest Diagram.documentBounds that you will be rendering? It might be too big to be able to create a single image. If so, you either need to render multiple images, in the same manner as printing multiple pages, or else render SVG.