can I create an excel cell which spans multiple columns using excelJS?
I tried getCell with a cell range. But the value was set in only the first column.
function colSpamDemo( )
{
let wb = new ExcelJS.Workbook();
let ws = wb.addWorksheet('Export');
ws.getCell('A1:C1').value = 'This price list supercedes all prior price lists.';
ws.getCell('A1:C1').alignment = { horizontal:'center'} ;
}
You can create a merged cell, which sounds like what you are looking for.
function colSpamDemo( )
{
let wb = new ExcelJS.Workbook();
let ws = wb.addWorksheet('Export');
ws.mergeCells('A1:C1');
ws.getCell('A1').value = 'This price list supercedes all prior price lists.';
ws.getCell('A1').alignment = { horizontal:'center'} ;
}