Forum Discussion

Steph_tucker's avatar
Steph_tucker
Copper Contributor
Jan 25, 2019

Power Query

Can someone please tell me how I can preserve cell formatting even after I refresh my query! This would be extremely helpful for my work project right now! 

Thank you in advance. 

( I have attached my file - As you can see the headers show every couple of lines which b/c those are the headers for each individual file. Even after formatting once I refresh these lines re-appear again)

  • Could you please clarify bit more. If we speak about cells formatting these are things like color change, number format, column width and like.

     

    If repeating rows which you'd like to remove (aka headers) you may filter them within the query - add one more step and filter Hours (attached).

    • Steph_tucker's avatar
      Steph_tucker
      Copper Contributor

      I am unsure how to 'you may filter them within the query - add one more step and filter Hours (attached).' 

       

       I have deleted the 'Header Rows' within the Power Query Editor - but once I refresh the Master Key spreadsheet after the hours cells have been updated the 'Header Rows' re-appear again and the formatting of the spreadsheet returns back to the default. 

      • SergeiBaklan's avatar
        SergeiBaklan
        MVP

        We speak about "Combine_Excel__2" query?

        Here in query editor you may filter Hours column as

        This step generates M code which you may see in formula bar

        = Table.SelectRows(#"Changed Type", each ([Hours] <> "Hours"))

Resources