Skip to content

Commit e512d4f

Browse files
committed
修复excel中公示
1 parent 56458fc commit e512d4f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app/[lang]/tools/gendocx/content.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ export default function GenDocx() {
7272
const cell = row.getCell(index + 1);
7373
let value = cell.value;
7474

75+
if (value && typeof value === 'object' && value.result !== undefined) {
76+
value = value.result;
77+
}
78+
7579
// 使用numfmt库保持Excel中的原始格式
7680
if (cell.numFmt && value !== null && value !== undefined) {
7781
try {
@@ -169,6 +173,10 @@ export default function GenDocx() {
169173
const cell = row.getCell(Number(colNumber));
170174
let value = cell.value;
171175

176+
if (value && typeof value === 'object' && value.result !== undefined) {
177+
value = value.result;
178+
}
179+
172180
// 使用numfmt库保持Excel中的原始格式
173181
if (cell.numFmt && value !== null && value !== undefined) {
174182
try {

0 commit comments

Comments
 (0)