Column in
Column in
But if my data is
more than 255 character then it is getting truncated.
There is one writing option given(sharing code below) in the link for modifying
column but it is not working out -
type ColInfo = {
/* visibility */
hidden?: boolean; // if true, the column is hidden
export(){
let wscols = [
{width:256},
{width:5120},
{width:256}
];
let data:any[]=[];
for (let i=0; i<res.length; i++){
data.push({
'Name' : res[i].name,
'Comment' : res[i].comment,
'Age' : res[i].age
});
}
const ws: XLSX.WorkSheet=XLSX.utils.json_to_sheet(data);
const wb: XLSX.WorkBook = XLSX.utils.book_new();
ws['!cols'] = wscols;
XLSX.utils.book_append_sheet(wb, ws, 'Detail');
XLSX.writeFile(wb, 'Detail_Table.xls');
}
Here if my comment column is greater than 255 character then it is getting
truncated.
How to save the file without truncation? What parameter I am missing to set in
xlsx?