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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Importing strike through and font colours from excel to table on Power BI

Hi all,

 

I am getting data from an excel sheet which has values that has strikethrough and have red fonts. 

Is there any way I can have them show up the same way in the table visualisation as well?

As I would like to link data from that excel to another another excel to get a table and export it out into an excel sheet.

 

Thanks

 

1 ACCEPTED SOLUTION

Not sure my understanding of the requirement is correct here, but you can retrieve formatting information from Excel-files with some fairly extensive scripting: https://github.com/ImkeF/Power-Query-Excel-Formats

But I don't see a way to get this information outputted through Power Query in a useful way. So VBA would probably be a better way here.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

9 REPLIES 9
pranit828
Community Champion
Community Champion

HI @Anonymous 

When we get the data from any source the engine get only ther data not the formatting. So, after getting the data source, you can take steps on data.

This not yet supported on PBI, you can submit your idea

https://ideas.powerbi.com/forums/265200-power-bi-ideas

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile
Greg_Deckler
Super User
Super User

@Anonymous - I am not aware of a way to do that, you could do the red font but not the strike through. Conditional formatting.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler

 

how can I do that on the data that I am extracting from the excel with rows in red? 

@Anonymous - Well, I guess I was assuming that there was some reason or pattern as to why those things are in red or are you saying that some human is just flagging them as red for some reason that is not discernible as a pattern to a computer?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler

Some human is actually formatting it in red and placing a strikethrough on the different rows.

Is there a way for me to do that?

Thanks

@amelynatwork - I really do not think so. https://docs.microsoft.com/en-us/powerquery-m/excel-workbook just returns data, not any formatting information.

The only possible thing I could think of is if you could write some kind of R or Python script to access the Office API's or something but I think that is a very, very long shot.

@ImkeF and @edhans you are both much more excellent at Power Query than I, any ideas?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

You absolutely cannot return formatting in Power Query. There is actually a bug related to XLS files (not XLSX) that weird formatting can trick the Power Query importer. I opened a support ticket and discussed the possibility of retrieving the formatting to make the numbers in my article show up properly as negative. The Power Query team said it couldn't be done, and they weren't going to fix the bug - which I 100% understand given the XLS format was replaced in 2007.

Either use VBA, use some Excel formulas to add new columns of data with info that Power Query can use. I am not sure if you can write a formula in Excel to look at that kind of formatting. That would be a question for the Excel forums.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Not sure my understanding of the requirement is correct here, but you can retrieve formatting information from Excel-files with some fairly extensive scripting: https://github.com/ImkeF/Power-Query-Excel-Formats

But I don't see a way to get this information outputted through Power Query in a useful way. So VBA would probably be a better way here.

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Anonymous
Not applicable

Hi there,

 

how can I do that on the data that I am extracting from the excel with rows in red? 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.