c# Epplus读取Excel表格

时间:2021-01-11 11:52:13   收藏:0   阅读:72
       string ExcelName ="xxx"
       string
path = Application.StartupPath +"//"+ExcelName + ".xlsx";//获取表的地址 if (!File.Exists(path)) { MessageBox.Show(ExcelName+"表没有找到"); return; } using (ExcelPackage Excel = new ExcelPackage(new FileStream(path, FileMode.Open)))//打开表 { ExcelWorksheet sheet = ExcelBuff.Workbook.Worksheets[1]; for (int startRow= sheet.Dimension.Start.Row, endRow = sheet.Dimension.End.Row; startRow <= endRow; startRow++) { }
       }

原文:https://www.cnblogs.com/Rwans/p/14260639.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!