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
PhilJuniper
Frequent Visitor

HTML and Line Breaks

I have a data set in excel. One column has line breaks (entered in excel by using alt-enter).

I am displaying this text using HTML viewer, creating a HTML code by adding a column to the table, e.g,

 

HTMLData =
"<h4>" & "TITLE" & "</h4>"
& "<p>" & ExcelTable[ExcelFieldWithLineBreaks] & "</p>"
However, when this is displayed using HTML viewer, the line breaks are removed.
I have tried using <Pre> tags instead of <p>, and this keeps the line breaks but does not allow wrapping which is needed due to the length of text.
 
How can i display the text preserving line breaks whilst allowing text wrapping?
2 REPLIES 2
PhilJuniper
Frequent Visitor

Thanks, how would i find and replace the carriage returns entered in Excel (using ctrl - enter) with   <BR>?

amitchandak
Super User
Super User

@PhilJuniper , You can try </BR>  or  <BR> for line break , in case that is the ask

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.