How to set cell width when export .xlsx files with js-xlsx

Tags: , ,

I am trying to set a fixed column/cell width to my exported excel files with js-xlsx.


Here is the source of js-xlsx:

Data View


I found a snippet the the write test here

For quick reference, where ws is your worksheet.

var wscols = [

ws['!cols'] = wscols;

Source: stackoverflow