Questions tagged [exceljs]

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

508 questions
3
votes
3 answers

Is there a way to count the number of rows in an Excel sheet with exceljs?

I need to know the number of rows per column. In exceljs there is a way to count the columns, but not the rows apparently. https://www.npmjs.com/package/exceljs#columns
neolith
  • 699
  • 1
  • 11
  • 20
3
votes
1 answer

Generate Base64 from ExcelJS WorkBook

I am working with ExcelJS library in NodeJS for creating a excel file. What I need it's to generate a Base64 string from a Workbook object. I have this…
pbalasimon
  • 61
  • 3
  • 6
3
votes
0 answers

Convert Excel to PDF programmaticaly

I am using 'exceljs' module in my Angular project to build an Excel file. Instead of exporting it as Excel file, I would first like to convert it to PDF and then download it as such. I can successfully export and save this file to my computer: …
f.bele
  • 207
  • 2
  • 13
3
votes
3 answers

How to change msexcell cell format in Node.js by using exceljs

const Excel = require('exceljs'); let workbook = new Excel.Workbook(); let workSheet = workbook.getWorksheet(1); workSheet.getCell('W2').font = {color: {argb: "004e47cc"}}; this code sets font color for entire row, not just W2 cell. Same happens if…
VladP
  • 881
  • 2
  • 13
  • 37
3
votes
2 answers

Modify existing Excel file without changing the original format and links

I'm working on a NodeJS project and I need to modify an existing Excel spreadsheet but without changing the original format or links, just adding values to a couple of cells. Currently I've been using exceljs which works very well when it comes to…
Ramon Zuniga
  • 305
  • 2
  • 14
3
votes
3 answers

ExcelJS node: is there a method/ module for converting xlsx to json in exceljs

https://github.com/guyonroche/exceljs I m new to exceljs and just see the description of exceljs at github i .e : "Read, manipulate and write spreadsheet data and styles to XLSX and JSON." I need to convert workbook into JSON object and did not…
Manoj Saini
  • 31
  • 1
  • 1
  • 4
3
votes
1 answer

Reading Excel through exceljs module

I am reading excel by using exceljs module. When my excel file in same folder. It works fine. var workbook = new Excel.Workbook(); workbook.xlsx.readFile('Data.xls') .then(function() { var worksheet = workbook.getWorksheet(sheet); …
Vikas Gupta
  • 1,183
  • 1
  • 10
  • 25
3
votes
2 answers

ExcelJS in coldfusion Project

Requirement is to export an excel file(*.xlsx) from ui-grid with some formatting. I am able to export the excel using angularjs, ui-grid and js-xlsx, however I am unable to format the excel cells (ex. bold, text color) with js-xlsx. I found Exceljs…
Yeou
  • 622
  • 1
  • 7
  • 21
3
votes
2 answers

exceljs - Apply fill to cell range

To apply fill to a particular cell exceljs doc helped me with the below code. worksheet.getCell('A1').fill = { type: 'pattern', pattern:'solid', fgColor:{argb:'FF0'} }; But to apply fill…
SO-user
  • 1,458
  • 2
  • 21
  • 43
3
votes
2 answers

How to get user info using Office-js-helper's Authentication?

I am working on Excel Web Add-In. I am using OfficeDev/office-js-helpers library for authenticating user. Following code is working fine. But I don't know how to get user's email, user name etc. Is there any function available in…
3
votes
1 answer

error reading .xls file by exceljs node module

Package: https://www.npmjs.com/package/exceljs Version: "exceljs": "^0.2.31", Getting this error: [Error: invalid signature: 0xe011cfd0] when reading (dot xls) file. .xls workbook.xlsx.readFile(inputFile.file) Getting the error in the…
Jagpreet Singh
  • 218
  • 1
  • 13
3
votes
2 answers

how to use createAndFillWorkbook() in exceljs?

I followed the documentation var workbook = createAndFillWorkbook(); and I get this error Object # has no method 'createAndFillWorkbook' even if I required exceljs already var Excel = require("exceljs"); What I wanted to do was to create a…
Monece Solis
  • 683
  • 2
  • 6
  • 23
2
votes
1 answer

How to get the validations applied on a cell in an Excel file using javascript?

In ExcelJs package there is dataValidation or _dataValidation attribute for cell object. This gives the type of data in cell like list, dropdown, decimal, boolean etc. But, for some reason, it is throwing Javascript out of heap memory error for some…
user21938241
2
votes
1 answer

How to insert a value from a list in excel sheet using nodeJs and excelJs

Have created an application using nodejs(npm excelJs), which writes the data to an excel sheet(which includes validations and automatic calculations). for example:I have a column called "type" in my excel which have a validation of: { type:…
2
votes
1 answer

How can I access and process nested arrays on JSON to import on Excel?

Here is the JSON data :- "data": [ { "character_id": "5785304882", "id": 289222, "login_status": { "created": "2022-09-21T19:52:04.394", "status": "Started Competition" }, "name": "user_01", …