导入
This commit is contained in:
@@ -155,15 +155,11 @@ namespace DOAN.Service.BZFM
|
|||||||
{
|
{
|
||||||
IWorkbook workbook = new XSSFWorkbook(stream);
|
IWorkbook workbook = new XSSFWorkbook(stream);
|
||||||
ISheet sheet = workbook.GetSheetAt(0);
|
ISheet sheet = workbook.GetSheetAt(0);
|
||||||
// 处理第2行 获取日期
|
|
||||||
|
|
||||||
IRow secondRow = sheet.GetRow(1);
|
|
||||||
NPOI.SS.UserModel.ICell cell = secondRow.GetCell(0);
|
|
||||||
|
|
||||||
#region 读取excel
|
#region 读取excel
|
||||||
|
|
||||||
// 遍历每一行
|
// 遍历每一行
|
||||||
for (int row = 4; row <= sheet.LastRowNum; row++)
|
for (int row = 2; row <= sheet.LastRowNum; row++)
|
||||||
{
|
{
|
||||||
IRow currentRow = sheet.GetRow(row);
|
IRow currentRow = sheet.GetRow(row);
|
||||||
if (currentRow != null) // 确保行不为空
|
if (currentRow != null) // 确保行不为空
|
||||||
|
|||||||
Reference in New Issue
Block a user