Can´t style stubs, or get empty strings to be recognized as empty cells in excel #3263
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#3263
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
I am utilizing xlsx-js-style fork of sheetJS in which I'm just applying simple styles of border to each cell. When I create a cell of type 's'(str) with a empty value, it works fine, but for finding the empty cells in excel with f5 -> special -> get blank, excel cannot find them. I made some researches and discovered that this happens due to excel not interpreting empty strings/strings of length 0 as a blank cells. If I use the stub type, the styles are not applied to the cell. Do someone have any idea on how to apply the styles in a blank cell?
A sample code to try and generate the problem
const vstyle = {
border: {
left: { style: 'thin', color: "000000" },
top: { style: 'thin', color: "000000" },
right: { style: 'thin', color: "000000" },
bottom: { style: 'thin', color: "000000" }
},
}
let ws = XLSX.utils.aoa_to_sheet([
[
{t: "s", v: "", s: vstyle},
{t: "z", v: "", s: vstyle}
]
]);
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, "Report");
XLSX.writeFile(wb,
report.xlsx
);Note that only the stub cell with be identified as a blank cell, but it doesnt get the border style