update at 2026-02-14 10:55:14

This commit is contained in:
douboer@gmail.com
2026-02-14 10:55:14 +08:00
parent 6709fac5ac
commit 4c9f54e0a6
4 changed files with 72 additions and 3 deletions

View File

@@ -2,7 +2,10 @@
* 统一清洗文本,避免空格导致节点重复。
*/
function normalizeText(value) {
return String(value || '').trim();
if (value === null || value === undefined) {
return '';
}
return String(value).trim();
}
/**
@@ -236,7 +239,7 @@ function parseXlsxBuffer(buffer) {
const rows = xlsx.utils.sheet_to_json(sheet, {
header: 1,
raw: false,
defval: ''
blankrows: false
});
return toRawTable(rows);
}