Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Collapse]Spreadsheet
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
   [Expand]Spreadsheet Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Table Overview
   [Expand]Charting Overview
    Printing
    Events
   [Expand]Mail Merge Overview
    Protection
    Find and Replace
   [Collapse]Visual Elements
     Workbook
     Worksheet
    [Collapse]Cells and Cell Ranges
      Clipboard Operations
      Cell Formatting
      Conditional Formatting
      Custom Draw
     Rows and Columns
     Formulas
     Name Box
     Pictures
    [Expand]Dialogs
    Services
   [Expand]Shortcuts
   [Expand]Examples
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Cell Formatting

The SpreadsheetControl allows end-users to apply different formatting options to worksheet cells, such as font attributes, alignment options and background color. You can enable end-users to change cell appearance using the Ribbon UI. For an example on how to provide a Ribbon UI for the SpreadsheetControl, see Getting Started. The table below lists the basic operations for cell formatting available to end-users via Ribbon tabbed pages (or the spreadsheet context menu) and the corresponding API methods and properties.

The SpreadsheetControl also provides the capability for end-users to use keyboard shortcuts to quickly apply formatting options. For details, refer to the Cell Formatting document.

Action

End-user capabilities

API methods/properties

Apply a built-in style

In the Styles group within the Home tab, select the style that you wish to apply to the selected cells.

Range.Style

How to: Apply a Style to a Cell or Range of Cells

How to: Create or Modify a Style

Specify cell font

  • Use the Font group within the Home tab to specify the font family, size, style, color, etc.

  • Click the arrow in the bottom right corner of the Font group to invoke the Format Cells dialog with the Font tab opened.

Formatting.Font

How to: Change Cell Font and Background Color

How to: Configure Cell Font Settings

Specify alignment options

  • Use the Alignment group within the Home tab to position text within a cell.

  • Click the arrow in the bottom right corner of the Alignment group to invoke the Format Cells dialog with the Alignment tab opened.

Formatting.Alignment

How to: Align Cell Content

Apply borders

  • In the Font group within the Home tab, click the Borders button's drop-down menu and select the border type.

  • Right-click a cell and select the Format Cells... item in the context menu. Click the Border tab of the invoked dialog and specify the borders.

Formatting.Borders

How to: Add and Remove Cell Borders

Specify the background color

  • In the Font group within the Home tab, click the Fill Color button's drop-down menu and select the desired color.

  • Right-click a cell and select the Format Cells... item in the context menu. Click the Fill tab of the invoked dialog and specify the color.

Formatting.Fill

How to: Change Cell Font and Background Color

How to: Apply Gradient Fill

Apply number formatting

  • Use the Number group within the Home tab to specify the number format.

  • Right-click a cell and select the Format Cells... item in the context menu. Click the Number tab in the invoked dialog and specify the number format.

Formatting.NumberFormat

How to: Specify Number or Date Format for Cell Content

Clear formatting
  • In the Editing group within the Home tab, click the Clear button, and select Clear formatting in the drop-down menu.

  • In the Styles group within the Home tab, select the Normal style, to restore the default settings.

Worksheet.ClearFormats

How to: Clear Cell Formatting

How would you rate this topic?​​​​​​​