xlsx-template
xlsx-template copied to clipboard
Table with an array of 1 causes problem
t.substitute(1, {
titles: ['title1', 'title2'],
planData: [
{ name: 'A', role: ['role1'] },
{ name: 'B', role: ['role2'] }
]
});
With a input like this
Would result a file which excel would complain upon opening.
This is due to duplicate element inside sheet1.xml
.
<row ht="14" r="2" spans="1:7" x14ac:dyDescent="0.2">
<c r="A2" t="s">
<v>6</v>
</c>
<c r="B2" s="6" t="s">
<v>8</v>
</c>
<c r="B2" s="6" t="s">
<v>3</v>
</c>
</row>
Please see https://github.com/evanslify/xlsx-template/commit/796b7f1c4a76d618fa26b4b452b22b14fd35d51f
I have added a test to fail.
I have monkey-patched to prevent this double-insertion of cells, but a better way of fixing it could be of use.
After 6 months. Ping. @optilude @kant2002
@evanslify sorry for missing this. If you made PR, I review and very likely accept it.