Forum Discussion
Power BI REST API ExportTo MHTML leads to a base64 encoded file
- 1 year ago
Ok, plan B. Use Power Query to decode the Base64 data. Text.FromBinary(Binary.FromText(payload),Encoding.Base64)
Unfortunately this has had no effect for me. Adding the Accept text/html didn't change anything for me. I then switched it up, following your documentation, to */*:
But this also didn't lead to a different outcome
Ok, plan B. Use Power Query to decode the Base64 data. Text.FromBinary(Binary.FromText(payload),Encoding.Base64)
- martijnkuiper1 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!