-
Notifications
You must be signed in to change notification settings - Fork 277
LoadFromArrays
AdrianEPPlus edited this page Sep 2, 2024
·
2 revisions
The LoadFromArrays
method provides an easy way of loading an IEnumerable<object[]>
into a range on a worksheet.
var list = new List<object[]> {
new object[] { 1, 2, 3 },
new object[] { 4, 5, 6 },
new object[] { 7, 8, 9 }
};
using var package = new ExcelPackage();
var sheet = package.Workbook.Worksheets.Add("Sheet 1");
var importedRange = sheet.Cells["A1"].LoadFromArrays(list);
You can also load the data transposed from an array by using the LoadFromArraysTransposed
method.
sheet.Cells["A1"].LoadFromArraysTransposed(list);
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
- 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