Forum Discussion

dakdgdl's avatar
dakdgdl
Helper I
1 year ago

Power BI Custom Visual - Web API for edit the data of excel data source

Hi Guys,

 

I'm developing a powerbi custom visual.

There I need to edit the data pieces of individual cells of the excel data source bound with the visual.

I was just researching on that, and found an API endpoint as below.

https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources

 

But it doesnt support to edit the data cells, support only to update the entire data source by changing its connection string properties.

 

Please advice me if any of you got to know a way of editing each data cell value by calling an API or some other way.

That way sould be feasible to call an api from the coding of visual or some other programatical way within the visual, not via the powerbi online portal or desktop application.

 

Thanks in advance.

Lasanths

 

2 Replies

  • Hi Guys,

     

    I'm developing a powerbi custom visual.

    There I need to edit the data pieces of individual cells of the excel data source bound with the visual.

    I was just researching on that, and found an API endpoint as below.

    https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources

     

    But it doesnt support to edit the data cells, support only to update the entire data source by changing its connection string properties.

     

    Please advice me if any of you got to know a way of editing each data cell value by calling an API or some other way.

    That way sould be feasible to call an api from the coding of visual or some other programatical way within the visual, not via the powerbi online portal or desktop application.

     

    Thanks in advance.

    Lasanths

  • You cannot modify individual rows/columns of a semantic model.  The smallest change you can make for regular semantic models is a flush and fill of a partition.  For streaming datasets the smallest operation is to push a single row.

     

    If you want to modify the content of the Excel file that is the source of your semantic model then you could use the Graph API, but that will be meaningless as that change will not be reflected back in the semantic model until after the next semantic model refresh.  Excel files are not suitable for Direct Query connections, they are Import Mode only.