Forum Discussion
martijnkuiper
1 year agoFrequent Visitor
Power BI REST API ExportTo MHTML leads to a base64 encoded file
I am using a Python Notebook to export Paginated Reports to an HTML file. Now it works fine for CSV files, I get clear and readable CSV back, the same goes for IMAGE with the format set to PNG. But w...
- 1 year ago
Ok, plan B. Use Power Query to decode the Base64 data. Text.FromBinary(Binary.FromText(payload),Encoding.Base64)
lbendlin
1 year agoSuper User
Ok, plan B. Use Power Query to decode the Base64 data. Text.FromBinary(Binary.FromText(payload),Encoding.Base64)
martijnkuiper
1 year agoFrequent Visitor
I in stead used Python base64 library (since moving in PowerQuery within my script would be quite some redesign) and I now get the same HTML content as I am getting when I export the paginated report to HTML from the browser view.
I can't imagine this is working as intended, but I at least now have an HTML file!