| | |
| | | ISheet sheet = Workbook.GetSheetAt(0); |
| | | //第一行为标题行 |
| | | IRow headerRow = sheet.GetRow(0); |
| | | if (headerRow == null) |
| | | { |
| | | return table; |
| | | } |
| | | int cellCount = headerRow.LastCellNum; |
| | | int rowCount = sheet.LastRowNum; |
| | | |
| | |
| | | { |
| | | IRow row = sheet.GetRow(i); |
| | | DataRow dataRow = table.NewRow(); |
| | | if (row != null) |
| | | if (row != null&&row.Cells.Count>0) |
| | | { |
| | | for (int j = row.FirstCellNum; j < cellCount; j++) |
| | | { |
| | |
| | | ISheet sheet = Workbook.GetSheetAt(0); |
| | | //第一行为标题行 |
| | | IRow headerRow = sheet.GetRow(0); |
| | | if (headerRow == null) |
| | | { |
| | | return list; |
| | | } |
| | | int cellCount = headerRow.LastCellNum; |
| | | int rowCount = sheet.LastRowNum; |
| | | |
| | |
| | | { |
| | | IRow row = sheet.GetRow(i); |
| | | DataRow dataRow = table.NewRow(); |
| | | if (row != null) |
| | | if (row != null&&row.Cells.Count>0) |
| | | { |
| | | for (int j = row.FirstCellNum; j < cellCount; j++) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | for (int m = 0; m < 2; m++) |
| | | for (int m = 0; m < count; m++) |
| | | { |
| | | DataTable table = new DataTable(); |
| | | //定位在第一个sheet |
| | | ISheet sheet = Workbook.GetSheetAt(m); |
| | | //第一行为标题行 |
| | | IRow headerRow = sheet.GetRow(0); |
| | | if (headerRow == null) |
| | | { |
| | | return list; |
| | | } |
| | | int cellCount = headerRow.LastCellNum; |
| | | int rowCount = sheet.LastRowNum; |
| | | |
| | |
| | | { |
| | | IRow row = sheet.GetRow(i); |
| | | DataRow dataRow = table.NewRow(); |
| | | if (row != null) |
| | | if (row != null&&row.Cells.Count>0) |
| | | { |
| | | for (int j = row.FirstCellNum; j < cellCount; j++) |
| | | { |