I searched the ExcelPackage documentation to see how the collection of Type Names [] types returned, and found that the documentation was coming up soon, or at least that's what they talked about in 2007.
I suggest you use EPPlus, which is an excel library (xlsx only), which worked great for me.
official link
Basic usage instructions
Now, to set the value for each cell in the named range:
ExcelWorksheet sheet = _openXmlPackage.Workbook.Worksheets["SheetName"]; using (ExcelNamedRange namedRange = sheet.Names["RangeName"]) { for (int rowIndex = Start.Row; rowIndex <= namedRange.End.Row; rowIndex++) { for (int columnIndex = namedRange.Start.Column; columnIndex <= namedRange.End.Column; columnIndex++) { sheet.Cells[rowIndex, columnIndex].Value = "no more hair pulling"; } } }
source share