EasyXLS

Custom formatting for cell ranges

EasyXLS™ library allows defining custom auto formats for generating nice reports. The user can define his own auto formatting, starting from scratch or starting from a predefined auto format.

Custom formatting layout

By using the custom formats the user can automatically design the report header, footer, left column, right column, odd/even stripes and report data.

The report space is split into 9 areas:

Top Left CellHeader RowTop Right Cell
Left ColumnTable StyleRight Column
Bottom Left CellFooter RowBottom Right Cell

EasyXLS provides two more auxiliary areas for alternating row stripes:

Top Left CellHeader RowTop Right Cell
Odd Row Stripes
Even Row Stripes
Odd Row Stripes
Even Row Stripes
Bottom Left CellFooter RowBottom Right Cell

and two more for alternating column stripes:

Top Left CellHeader RowTop Right Cell
Odd Column StripesEven Column StripesOdd Column StripesEven Column Stripes
Bottom Left CellFooter RowBottom Right Cell

Each area can have an ExcelStyle class attached that represents the formatting for the cells in that area.

Format options for an auto format

An auto format includes settings for:

- Cell text format: number format, currency format, date format, accounting format, percentage format, fraction format, text format and other custom formats
- Cell alignment: horizontal and vertical alignment, text indentation, wrap text and shrink options, text rotation and text direction
- Cell font settings: font name, font size, foreground, bold ant italic options, underline style, strikethrough, superscript and subscript effects
- Cell border: border line style and color
- Cell fill settings: background color, pattern style, pattern color, gradient fill
- Cell protection: locked cells and hidden formulas

Export Excel file with custom auto format

The below source code sample shows how to export an Excel file with a custom cell formatting applied.

C#.NET
VB.NET
C++
Java
PHP
ASP
VB6
VBS
Coldfusion
Python

The screen shot below represents the exported Excel file with a custom cell range formatting applied.

Exported Excel file with custom formatting on cell range

 

Available for: Professional, Excel Writer, Express Excel Writer
Go to top

EasyXLS Excel libraries:

.NET
.NET Excel Library
full .NET version to import, export or convert Excel files
.NET Excel Writer
.NET version to create and export Excel files
COM+ Excel Library
full COM+ version to import, export or convert Excel files
COM+ Excel Writer
COM+ version to create and export Excel files
-
Java
Java Excel Library
full Java version to import, export or convert Excel files
Java Excel Writer
Java version to create and export Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

MS Excel 97 - 2003
MS Excel 2007 - 2019
MS Excel 2021
Office 365
XLSXXLSMXLSBXLS
XMLHTMLCSVTXT