I am generating an Excel file with xlsx-populate.min.js and using a plain archive as template. I iniciate the process with
function getWorkbook() {
return new Promise(function (resolve, reject) {
var req = new XMLHttpRequest();
var url = 'template_a.xlsx';
req.open('GET', url, true);
req.responseType = 'arraybuffer';
req.onreadystatechange = function () {
if (req.readyState === 4){
if (req.status === 200) {
resolve(XlsxPopulate.fromDataAsync(req.response));
} else {
reject('Received a ' + req.status + ' HTTP code.');
}
}
};
req.send();
});
}
";
And write the values inside a promise after getting workbook
workbook.sheet(0).cell('M$jj').value('$obs');
The file is produced by generating a blob, so far ok.
I want to apply word wrap to a column starting from row 2 to the highest row.
Where and how should i call the richtext option.