Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
karmptl701
Frequent Visitor

HTML files from database

Hello,

 

I am doing practice in Power BI dektop for my project.
I have an database which is able to store HTML files in it in VARCHAR(MAX) datatype.
When I am retriving it in Power BI, I am not able to get it back in its pure format.
My HTML file only contains 8*10 table on which I want to do visualization and want to create reports.
The HTML files are auto genrated each week.

 

Thank you.

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @karmptl701,

 

Based on my assumption, you stored HTML tags with VARCHAR(MAX) datatype in SQL Database, right? If so, when you connect to SQL DB to fetch these HTML tags in Power BI desktop, these values will be considered as text. Currently, Power BI doesn't provide an an interpreter for HTML tags to convert tags to tables. Someone has submitted this feature request, you could click to vote it up:  HTML Tags.

 

As a workaround, instead of saving HTML source into database, you could store HTML tags into a file, then, store file path with binary datatype into database. Loading data into Power BI desktop, you would get a column (named as Column1) listing HTML file path like C:\Users\username\Desktop\filename.txt, then, you could add a custom column in Query Editor mode with below M code:

Custom column=Web.Page(File.Contents([Column1]))

Based on above steps, expand the new custom column, you can get the desired html table.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @karmptl701,

 

Based on my assumption, you stored HTML tags with VARCHAR(MAX) datatype in SQL Database, right? If so, when you connect to SQL DB to fetch these HTML tags in Power BI desktop, these values will be considered as text. Currently, Power BI doesn't provide an an interpreter for HTML tags to convert tags to tables. Someone has submitted this feature request, you could click to vote it up:  HTML Tags.

 

As a workaround, instead of saving HTML source into database, you could store HTML tags into a file, then, store file path with binary datatype into database. Loading data into Power BI desktop, you would get a column (named as Column1) listing HTML file path like C:\Users\username\Desktop\filename.txt, then, you could add a custom column in Query Editor mode with below M code:

Custom column=Web.Page(File.Contents([Column1]))

Based on above steps, expand the new custom column, you can get the desired html table.

 

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It was working before and when I was closing and applying from 'Edit Queries', it asked me about some Privacy level.
I didn't know about that. It stoped working after that.
Then I uninstalled Power BI and reinstalled it.

Now, in Power BI, it is not showing the pathname. It shows the column as binary.

And one more thing, I used VARBINARY(MAX) as datatype. Is it fine ?

 

Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.