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
4
votes
3 answers

unable to read empty cells reading excel file using js-xlsx

I have an excel file I am reading using js-xlsx. The code is working fine except where the cells are empty. These cells are ignored. How do I get these cells also when creating my JSON object? I went through some of the question on SO as well as…
Pallavi Prasad
  • 577
  • 2
  • 9
  • 28
4
votes
1 answer

How do you make js_xlsx save all empty headers?

I am working on a Meteor App, using the Node.js package called "js_xlsx" from "SheetJS", made by "SheetJSDev". I am using this package to transform an uploaded Excel sheet into JSON in the back-end, so I can store it in my MongoDB and use it to do…
Magicbjørn
  • 619
  • 9
  • 23
4
votes
2 answers

How can I read a file from an HTML input with js-xlsx?

I have an angular application where I am trying to read and parse a .xlsx file resorting to the js-xlsx JavaScript library. However I am having trouble opening the file on the JavaScript side. On my html I have a simple input of type file that opens…
João Paiva
  • 1,937
  • 3
  • 19
  • 41
3
votes
0 answers

How export all records from gird using xlsx. Now I can see the only top 100 row in xlsx file

I have implemented like This. The grid has multiple pages, and after exporting the file in xlsx format, the file contained only the first page data. so how can I download all rows? can you please help me here? const InvestigationTable1 =…
Ketan
  • 31
  • 1
3
votes
1 answer

SheetJs Convert workbook back to arraybuffer

I am new to SheetJs. We have this remote excel file within our internal platform which can be accessed only using API. I have to read this Excel file and update the excel contents and upload the excel file changes back using the API. The internal…
AnonymousCoder
  • 582
  • 2
  • 5
  • 18
3
votes
1 answer

js-xlsx how to rearrange columns?

I am using js-xlsx to create an excel file. After doing .json_to_sheet I am getting my sheet not with the wanted columns order. for example, I am getting the following order: 100 | 200 | 300| 400| a | b | c when 100, 200, 300, 400, a, b, c are my…
Dean Taler
  • 737
  • 1
  • 10
  • 25
3
votes
1 answer

How to set calculation mode of an xlsx file via Javascript?

I have a small code that imports an Excel workbook (xlsx) file, edits a cell value and finally saves the workbook in a different file. The problem with my code is that: in the new xlsx, auto-calculation is not set. I have to manually open the file…
Agricolo
  • 65
  • 1
  • 12
3
votes
2 answers

How to set the width of the entire column based on the content when export .xlsx files with js-xlsx?

I want to set column width equal to maximum length of the content of that column when exporting .xlsx files with js-xlsx How to set cell width when export .xlsx files with js-xlsx I tried with above. let sheet = workBook.Sheets.Sheet1; let wscols =…
Kikit
  • 101
  • 4
  • 11
3
votes
2 answers

Angular xlsx - multiple json to sheet

I have an export to excel using js-xlsx and the function utils.json_to_sheet. Problem is I have another json object that I want to export to the same sheet, right below the previous one. XLSX.utils.json_to_sheet(outputData); Tried to find anything…
Kris Bonev
  • 552
  • 1
  • 3
  • 16
3
votes
1 answer

Node.js xlsx get number of non-empty rows

I use xlsx in Node.js application to get the number of total rows. Here is the code const range = xlsx.utils.decode_range(sheet['!ref']); const totalRows = (range.e.r - range.s.r) + 1; The problem is it also counts formatted cells with empty text.…
CherryBelle
  • 1,302
  • 7
  • 26
  • 46
3
votes
1 answer

How to reduce the xlsx size after webpack

In my angular 5 application, I use xlsx to read content (contact information of teacher like email and name) from microsoft excel file, after webpack the application for production, I found the size of xlsx module is as large as 1.1M compared to…
James Hao
  • 765
  • 2
  • 11
  • 40
3
votes
1 answer

Node.js - get superscript and subscript in excel

I am parsing an excel which has superscripts and subscripts and want to enclose them like this : superscripted value subscripted value tried using xlsx, excel parser and SheetJS to try and identify if the value has been…
3
votes
1 answer

alasql requires xlsx which is already included

I am trying to export data to an excel sheet using alasql and xlsx. I have followed all the guidelines here: https://github.com/agershun/alasql/wiki/Xlsx This is my function: exportToExcel(data: any) { console.log(XLSX.version); alasql …
Nikola
  • 2,093
  • 3
  • 22
  • 43
3
votes
2 answers

Javascript Read Excel file on server with SheetJS

I am using a library called SheetJS and I want to read an excel sheet that resides on the server without using nodejs, only pure javascript. Is this possible? There is a message in the documentation that says "readFile is only available in server…
electricalbah
  • 2,227
  • 2
  • 22
  • 36
3
votes
1 answer

SheetJS: Do Not Include Headers In json_to_sheet

The SheetJS documentation shows a way to take a JSON Object and convert it to an Excel sheet. From their example: var ws = XLSX.utils.json_to_sheet([ {S:1,h:2,e:3,e_1:4,t:5,J:6,S_1:7}, {S:2,h:3,e:4,e_1:5,t:6,J:7,S_1:8} ],…
Tykin
  • 492
  • 2
  • 8
  • 16
1
2
3
9 10