Questions tagged [js-xlsx]

JavaScript Spreadsheet Parser and Writer

Parser and writer for various spreadsheet formats. Pure-JS cleanroom implementation from official specifications, related documents, and test files. Emphasis on parsing and writing robustness, cross-format feature compatibility with a unified JS representation, and ES3/ES5 browser compatibility back to IE6.

Resources

137 questions
1
vote
0 answers

reactjs - export data to xlsx file using xlsx-style

I am trying to export data to an excel file using xlsx-style, to add cells styling from the code. I wrote the following code, and the file is downloaded fine but without the styles. Does anyone have a solution for this? const addStyles =…
YYagelnik
  • 11
  • 2
1
vote
0 answers

parse xlsx file with date columns as numbers to STRING or proper timestamp date in javascript

I'm using an npm package called xlsx from this repo: https://github.com/SheetJS/sheetjs I am running with the option of cellDates: true but still my output is a number format. Anybody know how to adapt my code to get my date columns parsed as…
1
vote
1 answer

sheet_to_json producing bad array of array

Using Angular 9, I am building a step wizard and the first step is to read and parse an .xlsx file. I have a file input defined as such:
David
  • 5,877
  • 3
  • 23
  • 40
1
vote
1 answer

How to recalculate all formulas in excel file through Javascript?

I am trying to create a web app to open excel file on web page and I am using 'xlsx' module for this purpose. The problem is when I modify any content through 'xlsx' module. Sheet formulas do not refresh. For Instance, A1 = 2 , B1 = 2 ,C1 =…
Parampreet Rai
  • 154
  • 1
  • 12
1
vote
1 answer

Javascript convert short date number to javascript date

I have a .xlsx file which has a table which contains dates. When I read the table in to javascript (with xlsx nodejs package) the dates are formatted as numbers. I would like to convert these numbers to dates. For example the number 43527 should be…
Max888
  • 3,089
  • 24
  • 55
1
vote
1 answer

How to dowload an excel file from backend in frontend?

I want to launch a browser download of an excel file generated in my backend, but I can't figure how to pass that kind of response. app.get('/all', function (req, res) { db.query(...) LIMIT 20000;") .then(function (data) { let result…
ODLana
  • 149
  • 1
  • 3
  • 10
1
vote
0 answers

How to export excel from json data with appropriate row span using SheetJs?

I am using SheetJS js-xlsx react library to export data to an excel file. I am trying to export an excel file where there will be a dynamic rowspan for data where necessary. An easy way to do so is to use the table_to_book() method where the excel…
Tasnim Fabiha
  • 1,148
  • 1
  • 17
  • 31
1
vote
1 answer

How to write excel file with chart using js-xlsx

Using SheetJS js-xlsx "xlsx": "0.15.1" js is there a way to write excel file with chart. Basically I want to export html page that contains chart into an excel file. HTML page is getting exported successfully but the chart in the page is not getting…
DAIRAV
  • 723
  • 1
  • 9
  • 31
1
vote
1 answer

js-xlsx: How to delete row with merged cells?

I'm trying to get json data out of xlsx file but stumbled upon weird 'js-xlsx' behaviour. If I have a table with merged cells in the heading then I get only first row of data in output from the table. If i delete this row manually (in EXCEL) - then…
Ivan Kolyhalov
  • 902
  • 11
  • 16
1
vote
1 answer

reading named cells/range from excel with node js

I am parsing Excel files and trying to get informations from it. All the files have the same named ranges. The purpose of my program is to parse all the files to aggregate the datas. I have tried the package xlsx. With the package, I am able to get…
StaP
  • 107
  • 3
  • 13
1
vote
2 answers

Angular 7 only visible rows of paginated data table of angular material 6 are exported instead of the whole array using xlsx library

I need to export an angular material data table into excel file, using xlsx library. The issue is that, if I am using pagination within the data table, and on export, only the visible rows are exported: exportTable() { //let data =…
alim1990
  • 4,656
  • 12
  • 67
  • 130
1
vote
1 answer

How to open a Blob object in the browser?

I currently have a blob object which I would like to give the user the option to open. I am currently using js-xlsx from the SheetsJS library. I have successfully created an excel sheet with the given data I need in it. I convert the excel sheet…
Anthony
  • 233
  • 4
  • 14
1
vote
0 answers

How to export a XLSX file with fiex location?

I was tasked to develop an application that reads an xlsx file on a determined directory, and also it exports a generated XLSX file into this same directory. The problem is, the directory's set but using js-xlsx I can't avoid my application from…
user3628479
  • 91
  • 1
  • 7
1
vote
1 answer

Import from Excel with AngularJS

I am trying to import the Excel in to the ui-grid. I am trying to use the js xlsx library. I can convert the xlsx in to JSON but I am not sure how I can populate the xlsx in to the ui-grid. Below is the ui-grid: $scope.samplesGridOptions = { …
trx
  • 2,077
  • 9
  • 48
  • 97
1
vote
1 answer

How to make the datetime column shown correctly on the ms excel?

I was using below api to generate the excel file. var ws2 = XLSX.utils.json_to_sheet(dataForSheet, {skipHeader: true}); In the createtime column, only the date was displayed by default. Only when I click the cell, the datetime will be displayed.…
liam xu
  • 2,892
  • 10
  • 42
  • 65