Is it possible to keep cell formatting (bold/italic/etc) from a regular table to a power query table?

researcherjake

New Member
Joined
Dec 20, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Basically the title.
I'm trying to preserve the cell formatting from a regular Excel table into a Power Query table.
For example, cell A1 has the words "The Quick Brown Fox" and the only word "Brown" has been bolded. I would like to have that same word bolded in the Power Query table.

I know about "Change Type" and "Transform" in Power Query, but I don't see any other formatting options outside some Advanced Editor shenanigans'.
My m-code isn't the strongest, and my VBA skills are shaky at best, so there's a good chance I'm just missing something.

Are there any options?

See image for more examples

1646176121933.png
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi! Kinda, but mostly no. Power Query is all about getting and transforming data, and other than data type formatting (decimal vs int vs date vs text - very important things to sort out) does not deal at all with individual formatting. You use PQ to do all of the data crunching, and then the end program (Power BI / Excel) to control the actual table formatting.
I'm trying to preserve the cell formatting from a regular Excel table into a Power Query table.
Is the formatting able to be expressed as a set of rules in Conditional Formatting? If not, you're SOL; you can always manually format text within a cell but as soon as the table is refreshed, those changes are gone.

If you can use conditional formatting rules, you can apply them to the resulting PQ table in the worksheet. Click on the table and go to Table Design → Properties → ensure Preserve cell formatting is on (you can turn off Adjust column width if you want - I usually find it annoying). Your conditional formatting rules will persist and will update when the data is refreshed.
 
Upvote 0
Solution
Hi! Kinda, but mostly no. Power Query is all about getting and transforming data, and other than data type formatting (decimal vs int vs date vs text - very important things to sort out) does not deal at all with individual formatting. You use PQ to do all of the data crunching, and then the end program (Power BI / Excel) to control the actual table formatting.

Is the formatting able to be expressed as a set of rules in Conditional Formatting? If not, you're SOL; you can always manually format text within a cell but as soon as the table is refreshed, those changes are gone.

If you can use conditional formatting rules, you can apply them to the resulting PQ table in the worksheet. Click on the table and go to Table Design → Properties → ensure Preserve cell formatting is on (you can turn off Adjust column width if you want - I usually find it annoying). Your conditional formatting rules will persist and will update when the data is refreshed.

That's a bummer, but I appreciate the confirmation!
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top