excel-export icon indicating copy to clipboard operation
excel-export copied to clipboard

width attribute not working

Open Spandana-Gajangi opened this issue 8 years ago • 0 comments

column width is not increasing. here I'm attaching sample code and output file.

let workSheet={} //workSheet.stylesXmlFile = "styles.xml"; workSheet.cols=[{ caption:'key', type:'string', width:50, }, { caption:'buyerKey', type:'string', width:100, }, { caption:'buyerName', type:'string', width:100, }, { caption:'invoiceNumber', type:'string', width:500, }, { caption:'amount', type:'string', width:100, }, { caption:'id', type:'string', }, { caption:'originalDueDate', type:'string', width:200, }, { caption:'generatedAtUtc', type:'string', width:200, }, { caption:'requestStatus', type:'string', width:500, }, ]; let values = []; data.forEach(value => { values.push([value.key, value.buyerKey, value.buyerName, value.invoiceNumber, Math.round(value.amount).toString().replace(/(\d)(?=(\d\d)+\d$)/g, '$1,'), value.id, dateFormat(value.originalDueDate, 'dd-mmm-yy'), dateFormat(value.generatedAtUtc, 'dd-mmm-yy'), value.requestStatus, ]); }); workSheet.rows=values; download19.xlsx

Spandana-Gajangi avatar Nov 28 '17 10:11 Spandana-Gajangi