Home

Francois Botha edited this page Jan 25, 2017 · 8 revisions

FAQ

Examples

Real world scenarios

Time Savers

Performance and Memory

Misc

Inserting Data/Tables

Styles

Ranges

Rows

Columns

Page Setup (Print Options)

AutoFilters

Comments

Clone this wiki locally

Requirements:

To use ClosedXML you must reference the DocumentFormat.OpenXml.dll:

DocumentFormat.OpenXml.dll for NET 4.0+

DocumentFormat.OpenXml.dll for NET 3.5

FAQ

How do I deliver an Excel file in ASP.NET?

Does it support Excel 2003 and prior formats (.xls)?

How can I insert an image?

Text with numbers are getting converted to numbers, what's up with that?

How do I get the result of a formula?

Examples

Showcase

Basic Table

Hello World

Real world scenarios

Finding and extracting the data

Time Savers

Simplifying your life

Performance and Memory

Turning off events

Better lambdas

Where to use the using keyword

Other performance improvements

Misc

Data Types

Creating Multiple Worksheets

Organizing Sheets

Loading and Modifying Files

Using Lambda Expressions

Cell Values

Workbook Properties

Using Formulas

Evaluating Formulas

Creating Rows And Columns Outlines

Hide Unhide Row(s) And Column(s)

Freeze Panes

Copying Worksheets

Using Hyperlinks

Data Validation

Hide Worksheets

Sheet Protection

Tab Colors

Conditional Formatting

Pivot Table example

Inserting Data/Tables

Copying IEnumerable Collections

Inserting Data

Inserting Tables

Adding DataTable as Worksheet

Adding DataSet

Styles

Styles - Alignment

Styles - Border

Styles - Fill

Styles - Font

Styles - NumberFormat

NumberFormatId Lookup Table

Style Worksheet

Style Rows and Columns

Using Default Styles

Using Colors

ClosedXML Predefined Colors

Excel Indexed Colors

Using Rich Text

Using Phonetics

Ranges

Defining Ranges

Merging Cells

Clearing Ranges

Deleting Ranges

Multiple Ranges

Shifting Ranges

Transpose Ranges

Named Ranges

Accessing Named Ranges

Copying Ranges

Using Tables

Sorting Data

Selecting Cells and Ranges

Rows

Row Height and Styles

Selecting Rows

Inserting Rows

Inserting and Deleting Rows

Adjust Row Height and Column Width to Contents

Row Cells

Columns

Column Width and Styles

Selecting Columns

Inserting Columns

Inserting and Deleting Columns

Adjust Row Height and Column Width to Contents

Column Cells

Page Setup (Print Options)

Pages Tab

Paper Size Lookup Table

Margins Tab

Headers and Footers Tab

Sheet Tab

Print Areas and Page Breaks

AutoFilters

Adding an AutoFilter to a Range

Filter Values

Custom Filters

Comments

Visibility

Position

Signatures

Style - Alignment

Style - Colors and Lines

Style - Size

Style - Protection

Style - Properties

Style - Margins

Style - Web