Questions tagged [exceljs]

Node package to read, manipulate and write spreadsheet data and styles to XLSX and JSON.

508 questions
30
votes
3 answers

Modify existing Excel File using node.js

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…
jengfad
  • 704
  • 2
  • 8
  • 20
24
votes
6 answers

Node exceljs reading file

So according to the offical documentation i should be able to read an excel document using: // read from a file var workbook = new Excel.Workbook(); workbook.xlsx.readFile(filename) .then(function() { // use workbook }); //…
Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364
22
votes
6 answers

How to download created excel file in node.js using exceljs

I am using exceljs module for creating excel file. The problem is it is neither getting created nor getting saved in the path. var excel = require('exceljs'); var options = { filename: './streamed-workbook.xlsx', useStyles: true, …
codeinprogress
  • 3,193
  • 7
  • 43
  • 69
17
votes
4 answers

Add rows before the column header using excel.js module + node

I am trying to create xslx file using excel.js module in node.js. I was able to create the columns and add its values. But, I need to insert some rows before the columns headers, where I can have some descriptions. How can I do that? Any help will…
Mariya James
  • 935
  • 2
  • 9
  • 27
13
votes
3 answers

Creating excel file and writing to it with ExcelJS

I wrote a script that creates a new excel file with ExcelJS. Adds 3 headers and inserts 2 rows. Then saves that file to disk. In the next step it should read that previously saved file, add 1 row and save it again under a new name. I can't find the…
miyagisan
  • 805
  • 1
  • 9
  • 19
11
votes
6 answers

How to autosize column width in exceljs

I must to autosize column width with exceljs. My excel must be dynamic and save in Excel only the columns that the user will provide in the request. To this case I provide this syntax: workSheet.getRow(1).values = dto.columns; which save column…
user14022849
10
votes
3 answers

Currency format is excelJS

How do you format currency in exceljs? All I've found is this from their docs...which I have no clue how to type so I pasted it, but it doesn't seem to work // Set Column 3 to Currency Format ws.getColumn(3).numFmt = '�#,##0;[Red]-�#,##0';
tumelo
  • 544
  • 1
  • 4
  • 17
8
votes
1 answer

UnhandledPromiseRejectionWarning: Error: Invalid Address: Aundefined. How to handle it?

I am looping through Sheet 1 of an Excel file which contains 3 columns with 100s of rows of data (strings) and comparing each cell in a row against rows of combinations in Sheet 2. Checking should start using Sheet 1 row by row, seeing if each…
dom_ahdigital
  • 1,651
  • 18
  • 37
8
votes
1 answer

Read and write a xlsm file using exceljs package npm

I have a xlsm file with few data already in it and need to write some data and create a new xlsm file during automation. With below code the file gets created , but it becomes corrupt and unable to open. File size reduces, for ex from 8kb to 7kb.…
Nalu
  • 195
  • 2
  • 13
8
votes
2 answers

Editing Excel with ExcelJS

How do you edit a specific cell in an excel file using JavaScript? I am trying to do it using ExcelJS but having a hard time in writing to my excel file.
Prashant Dewan
  • 291
  • 1
  • 3
  • 11
7
votes
3 answers

ExcelJS node: horizontalCentered & verticalCentered in page not working

plz help me. My flow: Using a file Tempate -> Code (Exceljs) -> output New file Template file: Center on page: horizontally : Checked vertically : Checked Source coder: worksheet.pageSetup.horizontalCentered = true…
Tính Ngô Quang
  • 4,400
  • 1
  • 33
  • 33
7
votes
2 answers

Which preferred IDE for Office JS Excel addins

I am trying to develop add-ins for Excel with the Microsoft JS API. I have read the book from Michael Zlatkovsy about building office add-ins using Office.JS. but it is a very steep learning curve (having some background on VB 6, C, C# and Java.…
g00golplex
  • 397
  • 1
  • 6
  • 17
7
votes
2 answers

commit error on exceljs

I have tried creating an excel, but getting a commit error. Whats wrong in my code. If i remove the sheet.commit() and workbook.commit() program works fine. const Excel = require('exceljs'); const fs = require('fs'); const workbook = new…
mmar
  • 1,840
  • 6
  • 28
  • 41
6
votes
5 answers

Angular : Can't export excel using ExcelJS - error TS2307: Cannot find module 'stream' - error TS2503: Cannot find namespace 'NodeJS'

I was try to export an excel file using ExcelJS Here is my console in VS Code terminal : ERROR in node_modules/exceljs/index.d.ts:1398:22 - error TS2307: Cannot find module 'stream'. 1398 read(stream: import('stream').Stream): Promise; …
user12504785
6
votes
3 answers

ExcelJS Not Working In Production in Angular 6

ExcelJS Export Not Working in Angular 6 Production Environment, but works fine in development environment. I am using "exceljs": "^1.13.0" with "file-saver": "^2.0.2". So far I have tried updating: angular.json scripts with…
1
2 3
33 34