Questions tagged [exceljs]

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

508 questions
5
votes
1 answer

how write to cell that spans multiple columns using excelJS?

can I create an excel cell which spans multiple columns using excelJS? I tried getCell with a cell range. But the value was set in only the first column. function colSpamDemo( ) { let wb = new ExcelJS.Workbook(); let ws =…
RockBoro
  • 2,163
  • 2
  • 18
  • 34
5
votes
3 answers

writeFile not woking in exceljs

i am using exceljs and try to write value in a cell but it does not working. However workbook.xlsx.readFile(filename) is working but workbook.xlsx.writeFile(filename) won't. Here is my code:- var Excel = require('exceljs'); var fs =…
user7104874
  • 1,321
  • 2
  • 15
  • 21
5
votes
1 answer

Node writes corrupted .xlsx files after download

I`m using "xlsx" module on serverside. My server's gettings .xlsx files from client. It works great when file is uploaded with multipart. But when i'm trying to download files from Google Drive or Dropbox, i alway receive corrupted .xlsx…
4
votes
3 answers

HTML5/JavaScript "Save As" Dialog for File Download

I've written a NodeJS/Express application that generates and downloads an excel document (created using ExcelJS) upon the user pressing a button. When the user presses the button, the file is generated then downloaded to the user's default download…
GriffsAccount
  • 95
  • 1
  • 12
4
votes
2 answers

Exceljs: 'We found a problem with some content in ’filename.xlsx’.'

I am trying to render an excel file in Table format with Exceljs but I am getting this warning before opening the file: We found a problem with some content in ’test.xlsx’. Do you want us to try to recover as much as we can? If you trust the source…
Álvaro
  • 2,255
  • 1
  • 22
  • 48
4
votes
2 answers

How to save a worksheet from excel as a new excel file using javascript

An excel file with two worksheets in it(TAB1, TAB2). How to save 'TAB1' from the below excel as a new Excel file say tab1.xlsx? I am trying to work it out with exceljs but not sure how to save it as new file. If it cannot be done with help of…
saicharan
  • 435
  • 6
  • 18
4
votes
4 answers

How to set excelsheet row height to auto so that the content can autofit in the cell using exceljs

I am using exceljs npm to export data in excelsheet. As my content in the cell is huge so I wanted text to be wrapped in the cell and should take enough height to show full content. I tried by giving fixed width - worksheet.getRow(1).height =…
Shivam Kubde
  • 545
  • 1
  • 8
  • 17
4
votes
0 answers

It is possible to generate dropdowns with multiple choice selection with ExcelJS and Angular?

I am trying to develop a functionality in Angular with ExcelJS that allows me to generate an excel template downloadable from a website, so the user can fill it in with courses data and upload it again to save the data in my MongoDB database. I'm…
4
votes
0 answers

ExcelJS - TypeError: s.createWriteStream is not a function

So I am using Electron with React to create an application, where I want to do some basics Excel operations. Here is my code import Excel from 'exceljs'; var sheetName = 'Inventory'; var fileName = '../../inventory.xlsx'; var workbook = new…
Rohit V
  • 75
  • 1
  • 5
4
votes
2 answers

Achieving nested header structure while writing excel using SheetJS/ExcelJS

I want to achieve the below shown nested structure while writing the excel file in nodeJS application. I am not able to comprehend how to proceed. Is there a way to define multilevel headers or any JSON is possible using which I can achieve this…
4
votes
1 answer

Add Data-validation to an entire column in exceljs

How Do we add data-validation to an entire column in exceljs ? Or Is there any other library that supports such a feature ?
Amol Gupta
  • 2,054
  • 1
  • 14
  • 29
4
votes
2 answers

excelJS wrapText in Table columns

Is there a way to get wrapText working for columns in a table? I'm trying the following and it's not registering in excel. const columnsStyle = { font: { name: 'Arial Black', size: 12 } }; const columns = [ { name: 'PO#', style:…
user2402616
  • 1,434
  • 4
  • 22
  • 38
4
votes
1 answer

How to read from .xls file using exceljs?

I am unable to read from .xls file using exceljs library. I also tried to read after changing my file in .xlsx using fs but still I am unable to read data from that file. Is there any way to read from .xls file using exceljs?
Lokesh Jain
  • 579
  • 6
  • 19
4
votes
1 answer

Add multiple worksheet to a stream workbook with ExcelJS

Context NodeJS 10 ExcelJS 0.8.5 LibreOffice 5.1.6.2 on Ubuntu Issue I am trying to create a multi-sheet Excel file with ExcelJS. I am following the official documentation from the ExcelJS github page. The first step is the creation of the…
user7364588
  • 1,014
  • 2
  • 12
  • 32
4
votes
2 answers

How to use exceljs in angular 6

When I tried to use exceljs in Angular-6 like so import * as excel from 'exceljs' createExcel() { let workbook = new excel.Workbook() } even I just initialize a class and got this error. If I comment out this line let workbook = new…
WasiF
  • 26,101
  • 16
  • 120
  • 128
1 2
3
33 34