forked from github/dataease
Merge pull request #138 from dataease/repr@dev_v1.0@c5df1c1ca1dacccdc95085a87efb21c2ff55e475@Identify_excel_columns
fix(excel): 识别 excel 列数
This commit is contained in:
commit
977c15bba0
@ -890,7 +890,7 @@ public class DataSetTableService {
|
|||||||
if (row == null) {
|
if (row == null) {
|
||||||
throw new RuntimeException(Translator.get("i18n_excel_header_empty"));
|
throw new RuntimeException(Translator.get("i18n_excel_header_empty"));
|
||||||
}
|
}
|
||||||
columnNum = row.getPhysicalNumberOfCells();
|
columnNum = row.getLastCellNum();
|
||||||
}
|
}
|
||||||
String[] r = new String[columnNum];
|
String[] r = new String[columnNum];
|
||||||
for (int j = 0; j < columnNum; j++) {
|
for (int j = 0; j < columnNum; j++) {
|
||||||
@ -902,6 +902,7 @@ public class DataSetTableService {
|
|||||||
if (StringUtils.isEmpty(columnName)) {
|
if (StringUtils.isEmpty(columnName)) {
|
||||||
columnName = "NONE_" + String.valueOf(j);
|
columnName = "NONE_" + String.valueOf(j);
|
||||||
}
|
}
|
||||||
|
|
||||||
tableFiled.setFieldName(columnName);
|
tableFiled.setFieldName(columnName);
|
||||||
tableFiled.setRemarks(columnName);
|
tableFiled.setRemarks(columnName);
|
||||||
fields.add(tableFiled);
|
fields.add(tableFiled);
|
||||||
|
Loading…
Reference in New Issue
Block a user