using (ExcelPackage ep = new ExcelPackage(new FileInfo(path)))
                        {
                            ExcelWorksheet ws = ep.Workbook.Worksheets[0]; //第1张Sheet

这个用EPPlus 读取excel,代码出错, the given key is not present in the dictionary

原来是因为用wps编辑过的原因. 用Excel重新保存一次就可以了.

posted on 2019-04-23 17:02  Gu  阅读(1294)  评论(1编辑  收藏  举报