-
Notifications
You must be signed in to change notification settings - Fork 295
Import
Mats Alm edited this page Dec 4, 2023
·
8 revisions
From the Cells property (ExcelRange) you can access these methods to loads data from various sources:
-
LoadFromTextandLoadFromTextAsync- Read a text file (csv, tsv, etc) and load the data into a range on a worksheet. -
LoadFromDataReaderandLoadFromDataReaderAsync- Loads data into a range from anSystem.Data.IDataReader -
LoadFromDataTable- Loads data into a range from aSystem.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 anIEnumerableusing reflection. -
LoadFromCollection using attributes- Loads data into a range/table from anIEnumerableusing reflection. Uses attributes that specifies styling, number formats, formulas, etc. -
LoadFromDictionaries- Loads data into a range from anIEnumerableofExpandoObject/dynamic objects (via theirIDictionary<string, object>interface. Useful for importing json data, example provided. -
LoadFromArrays- Loads data into a range from anIEnumerableofobject[]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.
EPPlus Software AB - https://epplussoftware.com
- What is new in EPPlus 5+
- Breaking Changes in EPPlus 5
- Breaking Changes in EPPlus 6
- Breaking Changes in EPPlus 7
- Breaking Changes in EPPlus 8
- Addressing a worksheet
- Dimension/Used range
- Copying ranges/sheets
- Insert/Delete
- Filling ranges
- Sorting ranges
- Taking and skipping columns/rows
- Data validation
- Comments
- Freeze and Split Panes
- Header and Footer
- Hyperlinks
- Autofit columns
- Grouping and Ungrouping Rows and Columns
- Formatting and styling
- The ExcelRange.Text property
- Conditional formatting
- Using Themes
- Working with custom named table- or slicer- styles