Firstly a big compliment on the contributors of the alasql
-project. It helps me a lot to export my JSON data to excel file. But for the next steps, I need some help about formatting the excel file.
Is it possible to define the cells with an automatically width? And I need to color one column.
I have been seen a post in an other thread, but this didn't work in my example.
Here is my code:
var opts = {
headers: true,
column: {
style: {
Font: {
Bold: "1"
}
}
},
rows: {
1: {
style: {
Font: {
Color: "#FF0077"
}
}
}
},
cells: {
1: {
1: {
style: {
Font: {
Color: "#00FFFF"
}
}
}
}
}
};
vm.btnExport = function () {
alasql('shortcode AS Short_Code, \ ' +
'fname AS Fullname, \ ' +
'INTO XLSX("test.xlsx", ?) FROM ?', [opts, vm.list]);
};