Node package to read, manipulate and write spreadsheet data and styles to XLSX and JSON.
Questions tagged [exceljs]
508 questions
2
votes
3 answers
Nested async await not working as expected
I'm trying to add a table in my existing code for some data and for this i have setted up everything similar to what mentioned in the exceljs docs. Here is a code snippet of the condition where i'm trying to get the data i need in order to get the…

Ashish Bairwa
- 757
- 1
- 6
- 19
2
votes
1 answer
Yarn seems to not download all files of a package
I run into an odd problem. We have 3 microservices in our project, and all of them are using exceljs lib.
In two of them, yarn does download all the needed files of this package.
In the third one, it is missing the dist/es5/doc folder.
Version is…

Przemek Lewandowski
- 374
- 1
- 2
- 17
2
votes
1 answer
Why are the charts in Excel deleted if I export the data with' ExcelJS'?
I succeeded in reading the existing Excel file and putting the data in the cell location I wanted. But after we put the data in, all the ExcelCharts in the existing Excel file disappeared. I'm still looking for a solution, but I can't solve…

labongtoo
- 31
- 3
2
votes
1 answer
NodeJS: invalid array length Allocation failed - JavaScript heap out of memory
I'm trying to export data from a file and add this data to an Excel file using ExcelJS.
worksheet.addRows(freedomRawData.records);
'records' is an array that contains more than 165,000 elements in it. While writing the data to excel file, I get the…

Shamees Ibn Yousaf
- 103
- 2
- 9
2
votes
0 answers
Office.context.document.getFileAsync causing Internal Error when reading current document
I am trying to read the current opened document (where the add-in will be ran) to upload it to a web service. But when I tried retrieving the file, an internal error occurs.
OS: Windows 10
Add-in Host: Excel
Platform: Scriptlab (will migrate to the…

Ralph Noel Martin
- 21
- 1
2
votes
1 answer
Why ExcelJs plugin is not working in IE11?
I am using Angular 9 and excelJs 4.1.1, this is working fine in chrome but only in IE11 giving Error: Invalid range in character set in polyfills-es5.js
When I remove the this dependency from package.json, everything working fine.
I have added all…

saash_me
- 81
- 7
2
votes
3 answers
Setting a state variable in react-dropzone `onDrop`, after reading with exceljs
A use case is:
user drops a file
Take a file and read with exceljs
grab values from a column and keep it inside an array ids
set a state variable onDropIds with the contents of ids. I got steps 1-3 working. I can't get 4 to work.
See: State…

Kyle
- 5,407
- 6
- 32
- 47
2
votes
0 answers
ExcelJS and formatting text
I'm trying to format a value in ExcelJS.
I am targeting getCell('A1') and the value should be: vehicle: CP0555LP-JHB(A)
I need only the vehicle: to be bold and the rest of the text plain.
Is this doable in the same cell?
So just to recap, I need it…

John'Sters
- 185
- 2
- 14
2
votes
1 answer
Editing Excel files in Electron app (Node.Js)
I have an electron app where I need to read data from an Excel file and write back changed data. I also need to preserve the formatting of the Excel file.
The Excel file I am using is created with the Excel product part of the Microsoft 365 for…

Tibi
- 439
- 7
- 15
2
votes
1 answer
Testing exceljs (thrid party modules) with Jest
I am using exceljs to generate an excel file with some data in it. I want to write test cases for the function.
Here's the function:
public exportUploadErrors(data: UploadError[]): void {
const fileName = `lei-upload-errors-${new…

Pritam Bohra
- 3,912
- 8
- 41
- 72
2
votes
2 answers
Exceljs : iterate each cell of each row and column
I want to put thick border in all my cells. this is an angular project, I am using typescript.
I can do this for 1 cell,
worksheet.getCell('A1').border = {
top: { style: 'thick' },
left: { style: 'thick' },
bottom: { style: 'thick' },
right:…
user12504785
2
votes
1 answer
I need to merge cells in a table. Exceljs library
There was a problem.
I create worksheet in library EXCELJS
function save_export(){
var workbook = new ExcelJS.Workbook();
var worksheet = workbook.addWorksheet('sheet', {
pageSetup:{paperSize: 9, orientation:'portrait',fitToPage:…

Паша Харченко
- 91
- 2
- 8
2
votes
2 answers
Retrieving an xlsx file using http.get() and then loading said file into ExcelJs in Angular
I'm using HTTP GET to retrieve an xlsx file that I then want to load into an ExcelJs workbook. After which I want to add an additional sheet to the workbook and save it. This part seems to be working but WITHOUT the xlsx template file being part of…

mizukame
- 56
- 1
- 7
2
votes
1 answer
ExcelJS freeze rows
I'm trying to freeze rows in ExcelJS but cannot get it to work.
I'm trying both
worksheet.views = [
{state: 'frozen', ySplit: 1}
];
and
workbook.addWorksheet(sheetName, {
views: [
{state: 'frozen', ySplit: 1}
]
});
but it doesn't work.
I also…

user2402616
- 1,434
- 4
- 22
- 38
2
votes
1 answer
Reading the xlsx file using excelJS in Angular
I want to read a source file, edit it and then sent it to the user to download it. But I can't read the source file from the project. Here is an implementation of file reading in excelJS that I am using:
import {FormArray, FormControl, FormGroup,…

Max Pan
- 137
- 1
- 7