Example of Cell Formatting in ASP.NET MVC Spreadsheet Control

This sample demonstrates the Spreadsheet cell formatting feature by applying different styles to a range of cells.

DEMO
SOURCE

Cell formatting allows you to highlight cell data that appears in the Spreadsheet. It can be enabled or disabled using the allowCellFormattingopens in a new tab property.

In this sample, gridlines are hidden using the showGridLines property and the styles are applied using the styleopens in a new tab property and cellFormatopens in a new tab method.

Additionally, rich text formatting like subscript and superscript are applied to emphasize parts of the data, improving readability and presentation.

To improve performance, suspendRefresh method is invoked before applying formatting, which temporarily pauses UI rendering while updates are made. After all formatting is completed, resumeRefresh method is invoked to render all changes at once, ensuring smoother performance.

  • Text Styling - Apply font weight, font family, font size, alignment, and indentation to clearly distinguish headers and content.
  • Number & Date Formatting - Format currency values and dates using Excel-style number formats for consistent data presentation.
  • Borders & Layout - Use borders and spacing to visually separate rows and columns for improved structure.
  • Conditional Cell Formatting - Dynamically apply styles during rendering to highlight order statuses such as Delivered, Shipped, Pending, or Cancelled.

More information about cell formatting can be found in this documentation opens in a new tab section.

Transform your ASP.NET MVC web apps today with Syncfusion® ASP.NET MVC components
100+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab