I am stuck actually i am working in a mean stack and i have a requirement in my project to write data in existing micros enable validated excel sheet. I do a lot of google but i did't find any node or angular module those are fulfill my requirement. Everyone given me option to create new file no one give me option update existing excel. Its really strange
Below is my requirement step by step
- I have an micro enable excel (.xlsm)
- Now i have to open it and write some data in angular or node js.
- After that threw it to the user for download.
Please help me anyone
The SheetJS API allow you convert Microsoft Excel (.xls / .xlsx) and OpenDocument (.ods) formats to JSON stream or files and import/export from/to MongoDB or MongooseJS. Just study the simple and easy API.
In Github you can find the documentation, tutorials and code examples.
Site: http://sheetjs.com/
Project: https://github.com/SheetJS/js-xlsx
Interactive Demo: http://oss.sheetjs.com/js-xlsx/
Use the code example below, but just before run
npm install xlsx
and put the chunk of code to open the .xlsm file:var workbook = XLSX.readFile('test.xlsx');
.Currently office file is zip archive with xml files. So, in Node.js you can extract data by e.g.
node-zip
, changed by e.g.xml2js
and zipped back.