I have to export all data from PowerBI visual.
I managed to use a library powerbi.js (https://github.com/Microsoft/PowerBI-JavaScript/wiki/Export-Data) and manage to implement the following solution:
report.page("ReportSection").getVisuals()
.then(function(visuals) {
return visuals.find(function (visual) { return visual.name === "829c5bdfe33aba301b32" });
}).then(function(emailVisual) {
return emailVisual.exportData(models.ExportDataType.Summarized)
}).then(function(result) {
console.log(result.data.length)
});
However, because the visual (which is a table) use lazy load to load all the enries, when I export the data - it only export records, that are currently loaded into the visual.
To load more data, I need to scroll down the table, and call the above code again.
Is there a solution to export all data programmically at once?