-
Notifications
You must be signed in to change notification settings - Fork 272
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:
-
LoadFromText
andLoadFromTextAsync
- Read a text file (csv, tsv, etc) and load the data into a range on a worksheet. -
LoadFromDataReader
andLoadFromDataReaderAsync
- 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 anIEnumerable
using reflection. -
LoadFromCollection using attributes
- Loads data into a range/table from anIEnumerable
using reflection. Uses attributes that specifies styling, number formats, formulas, etc. -
LoadFromDictionaries
- Loads data into a range from anIEnumerable
ofExpandoObject
/dynamic objects (via theirIDictionary<string, object>
interface. Useful for importing json data, example provided. -
LoadFromArrays
- Loads data into a range from anIEnumerable
ofobject[]
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
- Getting Started
- The Sample Project
- EPPlus and Docker
- EPPlus and Blazor
- EPPlus and Linux
- Security
- Configuration
- Releases/versioning
- What is new in EPPlus 5+
- Breaking Changes in EPPlus 5
- Breaking Changes in EPPlus 6
- Breaking Changes in EPPlus 7
- 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
- Autofit columns
- Grouping and Ungrouping Rows and Columns
- Formatting and styling
- Conditional formatting
- Using Themes
- Working with custom named table- or slicer- styles