Text does not come out normally in the horizontal merge cell. #3027
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#3027
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello, I am currently making an Excel file with Sheetjs.
But if you merge it horizontally, you create a file
As soon as you open it, try to recover it saying it is an error file.
After that, it's coming out like that image, and I want to know what's wrong with my source.
※Error image
※Image on first cell de-merge
------------------------- Source Start -----------------------------
`
let _toData = [
[{"v":"사원","t":"s","s":{"font":{"name":"맑은 고딕","sz":10,"bold":true},"alignment":{"horizontal":"center","vertical":"center"},"fill":{"fgColor":{"rgb":"F8F8F8"}},"border":{"top":{"style":"thin","color":{"rgb":"000000"}},"right":{"style":"thin","color":{"rgb":"000000"}},"bottom":{"style":"thin","color":{"rgb":"000000"}},"left":{"style":"thin","color":{"rgb":"000000"}}}}},{"v":"실적","t":"s","s":{"font":{"name":"맑은 고딕","sz":10,"bold":true},"alignment":{"horizontal":"center","vertical":"center"},"fill":{"fgColor":{"rgb":"F8F8F8"}},"border":{"top":{"style":"thin","color":{"rgb":"000000"}},"right":{"style":"thin","color":{"rgb":"000000"}},"bottom":{"style":"thin","color":{"rgb":"000000"}},"left":{"style":"thin","color":{"rgb":"000000"}}}}},{"v":"실적-계획 시간차","t":"s","s":{"font":{"name":"맑은 고딕","sz":10,"bold":true},"alignment":{"horizontal":"center","vertical":"center"},"fill":{"fgColor":{"rgb":"F8F8F8"}},"border":{"top":{"style":"thin","color":{"rgb":"000000"}},"right":{"style":"thin","color":{"rgb":"000000"}},"bottom":{"style":"thin","color":{"rgb":"000000"}},"left":{"style":"thin","color":{"rgb":"000000"}}}}},{"v":"계획","t":"s","s":{"font":{"name":"맑은 고딕","sz":10,"bold":true},"alignment":{"horizontal":"center","vertical":"center"},"fill":{"fgColor":{"rgb":"F8F8F8"}},"border":{"top":{"style":"thin","color":{"rgb":"000000"}},"right":{"style":"thin","color":{"rgb":"000000"}},"bottom":{"style":"thin","color":{"rgb":"000000"}},"left":{"style":"thin","color":{"rgb":"000000"}}}}}]
];
let CELL_MERGE_LIST = [{"s":{"r":0,"c":0},"e":{"r":0,"c":3}},{"s":{"r":0,"c":4},"e":{"r":0,"c":13}},{"s":{"r":0,"c":14},"e":{"r":2,"c":14}},{"s":{"r":0,"c":15},"e":{"r":0,"c":20}}];
let wb = XLSX.utils.book_new();
let ws = XLSX.utils.aoa_to_sheet(_toData);
ws['!cols'] = _toWidth;
if (CELL_MERGE_LIST != null && CELL_MERGE_LIST.length > 0) {
if(!ws['!merges']) {
ws['!merges'] = [];
}
ws['!merges'] = CELL_MERGE_LIST;
}
XLSX.utils.book_append_sheet(wb, ws, ExcelInfo.sheetName);
XLSX.writeFile(wb, ExcelInfo.fileName);
`
------------------------- Source End ----------------------------
Is there a problem with the sauce I wrote?
I've solved the horizontal merge When you combine the spaces, you just add the remaining number of columns after the first text.
However, there is an error in the vertical merger, so I think we only need to solve that part.
How do I declare it to come out like this?