Create an excel file with a few styles using client side JavaScript (if possible using js-xlsx library)
After some research I was able to find the solution to my own question. I found a new library named xlsx-style for giving styles. xlsx-style is build on top of js-xlsx for giving styles also to the generated excel file. The styles can be given to the cells using a new attribute inside cell object.
The explanation is available at the npm xlsx-style page.
Styling is given using a style object associated with each cell. Font, Color, alignment etc can be given using this style object.
I have added a minimalist demo in a github page. The sample code is available at this github repository.
You can find the screenshot of the generated excel page below.