Skip to main content
Power Automate
    • Connectors
    • Templates
    • Take a guided tour
    • Digital process automation
    • Robotic process automation
    • Business process automation
    • Process advisor
    • AI Builder
  • Pricing
  • Partners
    • Blog
    • Documentation
    • Roadmap
    • Self-paced learning
    • Webinar
    • Business process and workflow automation topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Microsoft Power Automate Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Automate
    • General Power Automate Discussion
    • Using Connectors
    • Building Flows
    • Using Flows
    • Power Automate Desktop
    • Process Advisor
    • AI Builder
    • Power Automate Mobile App
    • Translation Quality Feedback
    • Connector Development
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Galleries
    • Community Connections & How-To Videos
    • Webinars and Video Gallery
    • Power Automate Cookbook
    • Events
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Community Engagement
    • Community AMA
    • Community Blog
    • Power Automate Community Blog
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power Automate Community
    • Galleries
    • Power Automate Cookbook
    • Excel Formatting Features

    Excel Formatting Features

    04-18-2022 03:14 AM - last edited 05-15-2022 22:40 PM

    Multi Super User VJR
    Multi Super User
    1385 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    VJR
    Multi Super User VJR
    Multi Super User
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Report Inappropriate Content

    Excel Formatting Features

    ‎04-18-2022 03:14 AM

     

     

    Title: Format Excel Range (and make your Excel outputs look good)

     

    Short Description:

    • Apply a wide range of formatting features to a single cell or range of cells in a spreadsheet

     

    Formatting Features:

    1. FILL CELLS WITH COLOR:

    • Fill the Header row or Data rows with any color

     

    Sample 1: Header Row

    VJR_0-1650274987224.png

     

    Sample 2: Header and Data rows

    VJR_1-1650275135614.png

     

    2. CHANGE FONT COLOR:

    • Apply the font color of your choice to one or more cells

     

    Sample 1: Font color of Header row to white

    VJR_2-1650275246260.png

     

    Sample 2: Font color of Data rows to blue

    VJR_3-1650275274399.png

     

    3. ALTERNATE ROW SHADING:

    • Set alternate rows as per the color of your choice
    • The number of rows to be alternate is configurable. Can be 1, 2 or any number

    Sample 1: Light Aqua alternate rows

    VJR_4-1650275348200.png

     

    Sample 2: Gray alternate rows

    VJR_5-1650275379644.png

     

    4. HORIZONTAL ALIGNMENT:

    • Set horizontal alignment of text in one or more cells
    • Alignment options available:
      • Left
      • Center
      • Right

     

    Sample:

     

    VJR_6-1650275473812.png

     

     

    5. APPLY BORDERS:

    • Apply borders to cells with color, weight and style
    • Options available:
      • STYLE: Continuous, Dash, DashDot, DashDotDot, Dot, Double, SlantDashDot, LineStyleNone
      • WEIGHT:  Hairline, Medium, Thin, Thick
      • COLOR: any specified color

     

    Sample: Dash style, Medium thickness and Red colored border

    VJR_7-1650275554102.png

     

     

    6. APPLY A NUMBER FORMAT:

    • Apply any of the available format code to the cells (decimals, currency, percent, date formats, etc)
    • Either from the list of existing categories (left) or a Custom category (right)

    VJR_8-1650275601168.png

     

     

    Sample:

    VJR_9-1650275640288.png

     

     

    7. AUTOFIT CELLS:

    • Auto adjust height of all rows and width of all columns to get a best fit

    Sample:

    VJR_10-1650275729851.png

     

     

    8. TURN OFF GRID LINES:

    • Removes the default Excel gridlines

    Sample:     

    VJR_11-1650275803347.png

     

    9. CLEAR CONTENTS:

    • Clears formulas and values without clearing cell formatting and conditional formatting

    Sample:

    VJR_12-1650275866303.png

     

     

    10. CLEAR:

    • Clears cell values, formatting and formulas

    Sample:

    VJR_13-1650275931600.png

     

     

    11, 12, 13. FONT BOLD, UNDERLINE, ITALIC:

    • Three different functions to set the font to bold, underline and italicize

    Sample:

    VJR_0-1652679059051.png

     

     

    14. CHANGE FONT SIZE:

    • Change the font size to a new number

    Sample:

    VJR_2-1652679334689.png

     

     

    15. CHANGE FONT NAME:

    • Change the font to a new name

    Sample:

    VJR_4-1652679530266.png

     

     

     

     

     

    Attachments:

    1. Main.txt: Copy the contents of this file and paste it into the editor of the Main flow
    1. FormatExcelRange.txt: Copy the contents of this file and paste it into a Subflow by giving it a name as FormatExcelRange. Ensure to give the right name, spelling and case
    1. ReadMe.txt: Copy the contents of this file and paste it into a Subflow by giving it a name as ReadMe. Ensure to give the right name, spelling and case
    1. In the end you will have a Main Flow and Subflows as below

            VJR_14-1650276006329.png

         5. The Sales Records.xlsx Excel sample used in the above screenshots is available in the attachments.

     

     

    Some key notes:

    • This Flow was built in PAD version 2.18. It is recommended to first run these formatting features in a sample dummy process to avoid any version compatibility issues. Also take a backup of your Excel before applying any formatting feature(s).
    • To start with: Simply change the ExcelFilePath and run the sample process. Once everything looks fine make changes by adding/removing as required.
    • General exception handling is done wherever possible. You can add your own detailed exception handling as necessary.
    • The Main page code looks long because I have shown how to call/use every single formatting feature. You just need to use only the one(s) you need.
    • Refer the ReadMe tab inside the Subflow. Also read the comments on the Main Flow.
    • Please send me a private message if you are facing any issues.

     

     

    FormatExcelRange.zip
    Labels:
    • Labels:
    • Desktop flows
    • Excel
    • Formatting
    Message 1 of 1
    1,385 Views
    5 Kudos
    Reply
    • All forum topics
    • Previous Topic
    • Next Topic

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Pages
    • Power Automate
    • Power Virtual Agents

    • Sign up free
    • Sign in

    Browse

    • Templates
    • Connectors
    • Partners

    Downloads

    • Mobile
    • Gateway

    Learn

    • Documentation
    • Learn
    • Support
    • Community
    • Give feedback
    • Blog
    • Pricing

    • © 2023 Microsoft
    • Contact us
    • Trademarks
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Terms & conditions
    California Consumer Privacy Act (CCPA) Opt-Out Icon Your California Privacy Choices