using (ExcelPackage ep = new ExcelPackage(new FileInfo(path)))
{
ExcelWorksheet ws = ep.Workbook.Worksheets[]; //第1张Sheet
这个用EPPlus 读取excel,代码出错, the given key is not present in the dictionary
原来是因为用wps编辑过的原因. 用Excel重新保存一次就可以了.
2023-10-03 11:00:10
using (ExcelPackage ep = new ExcelPackage(new FileInfo(path)))
{
ExcelWorksheet ws = ep.Workbook.Worksheets[]; //第1张Sheet
这个用EPPlus 读取excel,代码出错, the given key is not present in the dictionary
原来是因为用wps编辑过的原因. 用Excel重新保存一次就可以了.