Skip to content

LoadFromArrays

Mats Alm edited this page Nov 10, 2026 · 3 revisions

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

The LoadFromArrays method provides an easy way of loading an IEnumerable<object[]> into a range on a worksheet.

Overview

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);

InsertCols1

Transpose

You can also load the data transposed from an array by using the LoadFromArraysTransposed method.

sheet.Cells["A1"].LoadFromArraysTransposed(list);

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

⌂ 换网址