Insert a column in exceljs

7k Views Asked by At

I have an existing xlsx file, with 4 columns. [ A, B, C, D ]. I want to insert a new column between A and B to have => [A, B, C, D, E] where B is new and C, D, E are the old [B, C, D]. I haven't found a method in the doc page

Doc : https://github.com/exceljs/exceljs

1

There are 1 best solutions below

2
On BEST ANSWER

I found the method called "spliceColumns". It works perfectly. For my example => workbook.spliceColumns(2, 0, [])