我有一个使用 EPPlus 以编程方式填充的 Excel 文件。
我尝试了以下方法:
// provides access to named ranges, does not appear to work with single cells
worksheet.Names["namedCell1"].Value = "abc123";
// provides access to cells by address
worksheet.Cells["namedCell1"].Value = "abc123";
以下确实有效 - 所以我知道我至少很接近。
worksheet.Cells["A1"].Value = "abc123";