Forum Discussion
How to edit PBIX (unzip → modify → rezip) without corruption?
- 1 year ago
Hi VigneshSami
A PBIX file is essentially a structured package with strict internal formatting, so manually unzipping, editing, and rezipping it almost always leads to corruption if the structure or encoding is even slightly altered. The display name you see in Power BI is not stored only in Report/Layout but also referenced in Metadata and other internal JSON parts, and Layout itself can sometimes be compressed in a proprietary way rather than plain UTF-8 JSON. If you edit only the Layout file and rezip, Power BI won’t be able to parse it because the package structure, file order, or compression flags no longer match what the engine expects. The zip must be recreated exactly (store vs. deflate compression, folder hierarchy preserved), and the JSON must maintain its original encoding. In practice, Microsoft does not support PBIX manipulation by editing internal files; the only reliable way to change the report name is either in Power BI Desktop before saving, or through the Power BI REST API or XMLA endpoints once the file is published. If your goal is automation, scripting against the REST API is the supported and safe method, while direct PBIX surgery is fragile and not recommended because the format is undocumented and can change between versions.
Hi VigneshSami
A PBIX file is essentially a structured package with strict internal formatting, so manually unzipping, editing, and rezipping it almost always leads to corruption if the structure or encoding is even slightly altered. The display name you see in Power BI is not stored only in Report/Layout but also referenced in Metadata and other internal JSON parts, and Layout itself can sometimes be compressed in a proprietary way rather than plain UTF-8 JSON. If you edit only the Layout file and rezip, Power BI won’t be able to parse it because the package structure, file order, or compression flags no longer match what the engine expects. The zip must be recreated exactly (store vs. deflate compression, folder hierarchy preserved), and the JSON must maintain its original encoding. In practice, Microsoft does not support PBIX manipulation by editing internal files; the only reliable way to change the report name is either in Power BI Desktop before saving, or through the Power BI REST API or XMLA endpoints once the file is published. If your goal is automation, scripting against the REST API is the supported and safe method, while direct PBIX surgery is fragile and not recommended because the format is undocumented and can change between versions.