back_recharge
gaojie 2019-01-18 15:37:44 +08:00
parent d93064f353
commit 713ecb6902
1 changed files with 24 additions and 24 deletions

View File

@ -33,29 +33,6 @@ public class ExcelUtils {
}
public static void readExcelData() throws IOException {
File file = new File(excelPath);
if (file.exists()) {
File[] files = file.listFiles();
for (File file1 : files) {
if (file1.isDirectory()) {
continue;
}
String extString = file1.getName().substring(file1.getName().lastIndexOf("."));
if (!".xlsx".equals(extString)) {
continue;
}
String filePath = excelPath + file1.getName();
Workbook wb = readExcel(filePath);
if(file1.getName().contains("1.Map_")){
bulidMapInfo(wb);
}else{
buildDataInfo(wb);
}
}
}
}
public static void genJavaFile(String fileName){
Map<String,String> fieldInfo = new HashMap<>();
@ -119,6 +96,29 @@ public class ExcelUtils {
System.out.println(getInfos);
}
public static void readExcelData() throws IOException {
File file = new File(excelPath);
if (file.exists()) {
File[] files = file.listFiles();
for (File file1 : files) {
if (file1.isDirectory()) {
continue;
}
String extString = file1.getName().substring(file1.getName().lastIndexOf("."));
if (!".xlsx".equals(extString)) {
continue;
}
String filePath = excelPath + file1.getName();
Workbook wb = readExcel(filePath);
if(file1.getName().contains("1.Map_")){
bulidMapInfo(wb);
}else{
buildDataInfo(wb);
}
}
}
}
private static String typeInfo(String fieldInfo){
//mut,int#int,2
if(fieldInfo.contains("mut")){
@ -167,7 +167,7 @@ public class ExcelUtils {
// }
if (row != null) {
StringBuilder info = new StringBuilder();
int colnum = row2.getLastCellNum();
int colnum = row1.getLastCellNum();
for (int j = 1; j < colnum; j++) {
int cellFormatValue = (int) getCellFormatValue(row1.getCell(j));
if (cellFormatValue == 3){