Mar*_*rek 5 javascript export powerbi powerbi-embedded powerbi-datasource
我必须从PowerBI visual导出所有数据.
我设法使用库powerbi.js(https://github.com/Microsoft/PowerBI-JavaScript/wiki/Export═)并设法实现以下解决方案:
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)
});
Run Code Online (Sandbox Code Playgroud)
但是,因为visual(它是一个表)使用延迟加载来加载所有的enries,当我导出数据时 - 它只导出当前加载到visual中的记录.
要加载更多数据,我需要向下滚动表格,然后再次调用上面的代码.
是否有解决方案可以立即以编程方式导出所有数据?
尝试使用修改您的代码
return emailVisual.exportData(models.ExportDataType.Underlying)
这应该为您提供所有数据,而不仅仅是当时视觉中显示的数据
| 归档时间: |
|
| 查看次数: |
1254 次 |
| 最近记录: |