Closed BlackSkyJY closed 6 years ago
@BlackSkyJY
I see the !merges
is undocumented. For each merge range you create an entry in the array specifying the upper left ("s") and lower right ("e") of the merged range. See example-style.js
So I think you'd have four entries like so. I haven't executed this so may require fiddling...
[
{ s: { c:0, r:0}, e: {c:1, r:0} }, //cellA
{ s: { c:0, r:2}, e: {c:1, r:4} }, //cellB
{ s: { c:2, r:1}, e: {c:3, r:1} }, //cellBa
{ s: { c:4, r:1}, e: {c:4, r:2} }, //cellBa
]
snippet from example-style.js
workbook = {
"SheetNames": [
"Main"
],
"Sheets": {
"Main": {
"!merges": [
{
"s": {
"c": 0,
"r": 0
},
"e": {
"c": 2,
"r": 0
}
}
],
"A1": {
"v": "This is a submerged cell"
}
}
}
in fact, If it's a custom header, it's difficult to make merges data formats, The watch head is not fixed
such as this picture I try to use ws['!merges'], but this is to difficult to implement it