fix
parent
33657a69e7
commit
62b82fe8e3
|
@ -47,7 +47,7 @@ public class ExcelUtils {
|
|||
sheet = wb.getSheetAt(0);
|
||||
String sheetName = sheet.getSheetName();
|
||||
System.out.println("bulidMapInfo => collection name="+sheetName);
|
||||
int rownum = sheet.getPhysicalNumberOfRows();
|
||||
int rownum = sheet.getLastRowNum();
|
||||
FileWriter fw = new FileWriter(path + sheetName + ".txt");
|
||||
PrintWriter out = new PrintWriter(fw);
|
||||
for (int i = 0; i < rownum; i++) {
|
||||
|
@ -57,14 +57,14 @@ public class ExcelUtils {
|
|||
Row row1 = sheet.getRow(2);
|
||||
Row row2 = sheet.getRow(1);
|
||||
Row row4 = sheet.getRow(4);
|
||||
int colnum = row1.getPhysicalNumberOfCells();
|
||||
row = sheet.getRow(i);
|
||||
// for (Cell c :row){
|
||||
// System.out.println(c.getColumnIndex() +"==="+row.getCell(c.getColumnIndex()));
|
||||
// }
|
||||
if (row != null) {
|
||||
StringBuilder info = new StringBuilder();
|
||||
for (int j = 1; j <= colnum; j++) {
|
||||
int colnum = row.getLastCellNum();
|
||||
for (int j = 1; j < colnum; j++) {
|
||||
int cellFormatValue = (int) getCellFormatValue(row1.getCell(j));
|
||||
if (cellFormatValue == 3){
|
||||
continue;
|
||||
|
@ -116,6 +116,8 @@ public class ExcelUtils {
|
|||
case "int":
|
||||
str = "0";
|
||||
break;
|
||||
case "string":
|
||||
break;
|
||||
default:
|
||||
str = null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue