Skip to content
Mats Alm edited this page Nov 10, 2026 · 12 revisions

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

Load data into a spreadsheet

From the Cells property (ExcelRange) you can access these methods to load data from various sources:

  • LoadFromText and LoadFromTextAsync - Read a text file (csv, tsv, etc) and load the data into a range on a worksheet.

  • LoadFromDataReader and LoadFromDataReaderAsync - Loads data into a range from an System.Data.IDataReader.

  • LoadFromDataTable - Loads data into a range from a System.Data.DataTable. Can be used for importing data from a range of sources, like XML (example provided) and databases.

  • LoadFromCollection - Loads data into a range from an IEnumerable using reflection.

  • LoadFromCollection using attributes - Loads data into a range/table from an IEnumerable using reflection. Uses attributes that specify styling, number formats, formulas, etc.

  • LoadFromDictionaries - Loads data into a range from an IEnumerable of ExpandoObject/dynamic objects (via their IDictionary<string, object> interface). Useful for importing json data, example provided.

  • LoadFromArrays - Loads data into a range from an IEnumerable of object[] where each object array becomes a row in the worksheet.

You can optionally specify a parameter to create an ExcelTable when you use these methods.

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

⌂ 换网址