exceljs

How to add multiple table with different data-set to the same sheet in exceljs

▼魔方 西西 提交于 2019-12-08 02:45:26
问题 I have a button to export a excel file with the data(JSON format). I can able to do for one table but I want to have multiple tables(different datasset-JSON) in the same excel sheet and export that file as shown below. I'm using exceljs and file-saver with angular2 in node environment. please guide me with the right approach. Thanks in advance. 回答1: I had a similar question and got the answer to it - Angular xlsx - multiple json to sheet Your case is a bit different as you need to play around

Angular 5 and ExcelJS

雨燕双飞 提交于 2019-12-04 19:14:57
I have been trying to use and following the examples from this library: https://www.npmjs.com/package/exceljs#create-a-workbook I am using it on Angular 5. I always get an error graceful-fs.js:166 Uncaught TypeError: Cannot read property 'prototype' of undefined at patch (graceful-fs.js:166) From these lines of my code: import * as Excel from 'exceljs'; export class ExcelHandler { public testExcelJs() { var workBook: Excel.Workbook; var workSheet: Excel.Worksheet; workBook = new Excel.Workbook(); workSheet = workBook.addWorksheet(sheetName); } } Thanks. Seems the npm example is given in node

Modify existing Excel File using node.js

瘦欲@ 提交于 2019-11-30 18:03:08
Is there any way to modify existing excel file in node.js? I've looked into exceljs but it does not provide any functionality that will just modify the existing data. It seems like it will write to a new stream. Or did I miss something on exceljs? Thanks in advance. exceljs does let you modify Excel spreadsheets. Here's an example of reading in an existing spreadsheet and writing it back out to a different file: var Excel = require('exceljs'); var workbook = new Excel.Workbook(); workbook.xlsx.readFile('old.xlsx') .then(function() { var worksheet = workbook.getWorksheet(1); var row = worksheet