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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors