EasyXLS

Custom formatting for cell ranges

Concept

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.

Using those 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 Cell Header Row Top Right Cell
Left Column Table Style Right Column
Bottom Left Cell Footer Row Bottom Right Cell

EasyXLS provides two more auxiliary areas for alternating row stripes:

Top Left Cell Header Row Top Right Cell
Odd Row Stripes
Even Row Stripes
Odd Row Stripes
Even Row Stripes
Bottom Left Cell Footer Row Bottom Right Cell

and two more for alternating column stripes:

Top Left Cell Header Row Top Right Cell
Odd Column Stripes Even Column Stripes Odd Column Stripes Even Column Stripes
Bottom Left Cell Footer Row Bottom Right Cell

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

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

Concept in action

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

Source code sample

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

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
.NET Excel Reader
.NET version to read and import 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
Java Excel Reader
Java version to read and import Excel files
Download EasyXLS™ Excel Library for .NET and Java

File formats:

MS Excel 97 - 2003
MS Excel 2007 - 2010
MS Excel 2013
MS Excel 2016
MS Excel 2019
XLSX XLSM XLSB XLS
XML HTML CSV TXT