cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Extracting .ts file from pbiviz file

Hello,

     I have got a .pbiviz file.How can i obtain .ts source file from this.Please help me with this.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Extracting .ts file from pbiviz file

You can open up a .pbiviz file using an archive tool such as 7Zip. However, the challenge you will have is that the resulting code is much different to the original source. It has been run through the TypeScript compiler into JavaScript and also minified and assembled via Webpack in pbiviz package to make it as compact as possible for production use, which will also make a number of optimizations and changes. The resulting JS is also encoded so that it can sit inside a JSON property in the .pbiviz.

 

Even if you can extract and "uglify" it, it is not going to resemble the original source so a lot of guesswork would be required if you were trying to get it back to how the author might have written it.

 

JSON data from the visual project such as capabilities should be pretty much as entered in the original project though, so the amount of success you're going to have is going to vary based on what elements of the original code you want to look at.

 

If you can obtain the source code from the author, it will save you from a lot of pain. If you can advise the visual (if a marketplace one) I might be able to assist you with locating the author's repository (providing they have opted to open source their code)

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
Highlighted
Super User II
Super User II

Re: Extracting .ts file from pbiviz file

You can open up a .pbiviz file using an archive tool such as 7Zip. However, the challenge you will have is that the resulting code is much different to the original source. It has been run through the TypeScript compiler into JavaScript and also minified and assembled via Webpack in pbiviz package to make it as compact as possible for production use, which will also make a number of optimizations and changes. The resulting JS is also encoded so that it can sit inside a JSON property in the .pbiviz.

 

Even if you can extract and "uglify" it, it is not going to resemble the original source so a lot of guesswork would be required if you were trying to get it back to how the author might have written it.

 

JSON data from the visual project such as capabilities should be pretty much as entered in the original project though, so the amount of success you're going to have is going to vary based on what elements of the original code you want to look at.

 

If you can obtain the source code from the author, it will save you from a lot of pain. If you can advise the visual (if a marketplace one) I might be able to assist you with locating the author's repository (providing they have opted to open source their code)

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Helpful resources

Announcements
Meet the 2020 Season 2 Power BI Super Users!

Meet the 2020 Season 2 Power BI Super Users!

Find out who's part of the program this season, and welcome the new Super Users.

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Top Solution Authors