@@ -70,7 +70,7 @@ var ExcelUtil = /** @class */ (function () {
if ((name_1 == undefined || name_1 == null) && row == 1) {
Config_1.Config.checkState(Config_1.RetCode.EXCEL_DATA_ERROR, "".concat(StringUtil_1.default.getCheckString(address, ret), " \n\u7F3A\u5931\u8868\u5934\u540D\u5B57!,\u662F\u4E0D\u662F\u63D2\u5165\u4E86\u7A7A\u5217\uFF1F"));
}
- if (ret.cols.findIndex(function (v) { return v == col; }) == -1 && worksheet[col + '1']) {
+ if (ret.cols.findIndex(function (v) { return v == col; }) == -1 && worksheet[col + '1'] && worksheet[col + '1'].v) {
ret.cols.push(col);
if (ret.cols.length > 0 && ret.maxRow < row && name_1 != undefined) {
@@ -74,7 +74,7 @@ export default class ExcelUtil {
if ((name == undefined || name == null) && row == 1) {
Config.checkState(RetCode.EXCEL_DATA_ERROR, `${StringUtil.getCheckString(address, ret)} \n缺失表头名字!,是不是插入了空列?`)
- if (ret.cols.findIndex((v) => v == col) == -1 && worksheet[col + '1']) {
+ if (ret.cols.findIndex((v) => v == col) == -1 && worksheet[col + '1'] && worksheet[col + '1'].v) {
if (ret.cols.length > 0 && ret.maxRow < row && name != undefined) {