Skip to content

Export data

Mats Alm edited this page Dec 4, 2023 · 9 revisions

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