PyXLL The Python Excel Add-In
  • Product
    • Features
    • Get Started
    • Request Demo
    • Download
  • Pricing
  • Resources
    • Documentation
    • Blog
    • Videos
    • FAQ
    • Learn Python
    • Customer Portal
    • About Us
  • Support
    • Documentation
    • Videos
    • FAQ
    • Contact Us
  • Contact Us
Table of Contents
  • PyXLL Documentation
  • Introduction to PyXLL
  • User Guide
    • Installing PyXLL
    • Configuring PyXLL
    • Worksheet Functions
    • Macro Functions
    • Real Time Data
    • Cell Formatting
      • Formatting Worksheet Functions
      • Pandas DataFrame Formatting
      • Custom Formatters
      • Formatting in Macros Functions
    • Charts and Plotting
    • Custom Task Panes
    • ActiveX Controls
    • Using Pandas in Excel
    • Customizing the Ribbon
    • Context Menu Functions
    • Working with Tables
    • Python as a VBA Replacement
    • Menu Functions
    • Reloading and Rebinding
    • Error Handling
    • Deploying your add-in
    • Workbook Metadata
  • Video Guides and Tutorials
  • API Reference
  • What’s new in PyXLL 5
  • Changelog
Close

Cell Formatting¶

Cell formatting

Cell Formatting Tutorial

Watch Video

Custom 'fill down' cell formatter blog post

Custom 'Fill Down' Formatter

Read Article

Using a formatter to create a 'single shot' function

'Single shot' functions using a custom formatter

Read Article

When returning values or arrays from a worksheet function, or when setting values on a sheet using a macro function, often you will also want to set the formatting of the values in Excel. This can be to make sure a returned value has the correct date or number format, or styling a whole table.

Formatting a DataFrame returned from a UDF

Standard formatters are provided for common cases, and you can also write your own formatters to achieve the exact style you need.

  • Formatting Worksheet Functions
  • Pandas DataFrame Formatting
    • Conditional Formatting
    • Custom Conditional Formatters
  • Custom Formatters
    • Combining Multiple Formatters
  • Formatting in Macros Functions

Warning

Formatting cells in Excel uses an Excel macro. Macros in Excel do not preseve the “UnDo” list, and so after any formatting has been applied you will not be able to undo your recent actions.

Warning

Formatting is new in PyXLL 4.5.

For prior versions formatting can be applied using the Excel Object Model.

Calls to Excel cannot be made from an xl_func function, but can be scheduled using schedule_call.

Note

Formatters applied to Dynamic Array functions make use of Workbook Metadata to keep track of formatting applied in order to clear it if the array later contracts.

« Real Time Data
Formatting Worksheet Functions »
  • Home
  • Product
  • Features
  • Documentation
  • Download
  • Pricing
  • Support
  • Documentation
  • Videos
  • FAQ
  • Learn Python
  • Contact Us
  • About
  • About Us
  • Legal
  • Blog
© Copyright PyXLL Ltd