Skip to content

Export data

Mats Alm edited this page Nov 10, 2026 · 11 revisions

This page has moved. The current version of this page is at https://epplussoftware.com/docs/import-export-data/export/. The EPPlus documentation is no longer updated in this wiki; please use the EPPlus guides and update your bookmarks.

Export data from a spreadsheet

From the Cells property (ExcelRange) you can access these methods to write:

  • ToText and ToTextAsync - Writes a range to a string in a text file format like csv or tsv.

  • SaveToText and SaveToTextAsync - Writes a range to a text file like csv or tsv.

  • ToDataTable - Exports data from a range to a System.Data.DataTable.

  • ToCollection - Exports data from a range to an IEnumerable<T> where T is a class.

  • ToJson - Exports data from a range to JSON.

  • CreateHtmlExporter - Exports data from a range to HTML/CSS.

  • GetValue<T> - Gets a value, with the option to specify a datatype.

  • Value - Gets or sets the value of the range.

See also

EPPlus wiki

Versions

Worksheet & Ranges

Styling

Import/Export data

Formulas and filters

Charts & Drawing objects

Tables & Pivot Tables

VBA & Protection

Clone this wiki locally

⌂ 换网址