POI LastRowNum and PhysicalNumberOfRows

来源:互联网 发布:越南芽庄网络怎么样 编辑:程序博客网 时间:2024/06/05 08:29

http://www.cnblogs.com/lwme/archive/2011/11/18/npoi_excel_import_export.html

使用NPOI导入

需要注意的是,sheet.LastRowNum = sheet.PhysicalNumberOfRows - 1,这里可能存在BUG:当没有数据或只有一行数据时sheet.LastRowNum为0,PhysicalNumberOfRows 表现正常