mkHun
mkHun

Reputation: 5921

How to fetch all images from an excel sheet using microsoft graph api?

I am trying to get the all image from the excel sheet in a single shot because my excel file having more than 50 image.

I'm using below code for read the one image using the range name.

function getCharts()
{
    var fileCollectionEndpoint = "https://graph.microsoft.com/v1.0/sites/my.sharepoint.com/drives/yyy/items/xxx/workbook/worksheets('Sheet1')/charts('Chart 2')/Image(width=300,height=300,fittingMode='fit')";
    $.ajax({
    url: fileCollectionEndpoint,
    async: false,
    dataType: 'json',
    type: "GET",
    headers: {
        'Authorization':'Bearer '+token_val,
    },
    success: function (json) {
        console.log(json);
    },
    error:function()
    {
    }
    });
}

Upvotes: 1

Views: 194

Answers (1)

Sudhi Ramamurthy
Sudhi Ramamurthy

Reputation: 2478

There is no API support yet for getting range as image or images themselves embedded in the worksheet. The example you are showing is just fetching chart as an image. You can certainly do that for each chart on a given worksheet. However, that's probably not what you are setting out to do.

Upvotes: 1

Related Questions