Description
I am trying to replace an implementation of PHPExcel with js-xlsx under node js as I am no longer using php server-side.
I have a series of excel templates that are pre-formatted with colours and styling, and also page size, margins, print areas etc etc, and then I simply add text to the relevant cells, under PHPexcel it works very well.
I discovered js-xlsx a few hours ago and thought I had found the solution, but it appears that I am unable to duplicate the original file, only with the cell values changed, whilst maintaining everything else in the original file.
var XLSX = require('xlsx');
var wb = XLSX.readFile('/usr/share/nodejs/dwap/public/xls/qplan.xlsx',{cellStyles:true});
XLSX.writeFile(wb,'/usr/share/nodejs/dwap/public/xls/out.xlsx',{bookSST:true});
I have used the simple code above to read in a formatted file and then save it again, but all of the styling is lost.
Is it possible to achieve this kind of functionality with js-xlsx and if so what am I doing wrong ?