Questions tagged [xlsx-js]

A javascript library for reading, writing and working with excel files.

See their github here.

14 questions
3
votes
1 answer

Sort and filter columns with XLSX js after json_to_sheet

I'm using this xlsx js library to generate an Excel file from a list of TypeScript objects in an Angular5 application. I don't need all attributes of the TypeScript objects and I want to sort the other attributes in a specific way. A simple…
David Kühner
  • 793
  • 1
  • 7
  • 19
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
2
votes
1 answer

Floating point error while reading excel file from js

I am reading an excel file that has decimal, string, and Unicode characters when the user uploads it. I am seeing a floating point error when reading some decimal values(not all). For example, if a number is 0.15 then it is read as 0.150000000002. I…
2
votes
1 answer

Package type definition cannot be found

I am working on a AngularJS project using typescript. I am trying to use the js-xlsx library to parse an xlsx file and I get the compile error: error TS2304: Cannot find name 'XLSX' We are using a global namespace for all files and all the compiled…
nswart
  • 153
  • 2
  • 13
1
vote
0 answers

How to specify different dateNF for different columns while exporting xlsx from json

I have following data - {billDate: "21-1-2021", createdDate: "20-2-2021", modifiedDate: "20-2-2022"} ... ] I have converted date string to date js objects. While exporting to sheet using method XLSX.utils.json_to_sheet How can i specify different…
Sumit M
  • 620
  • 5
  • 12
1
vote
2 answers

XLSX JS get header of column based upon address of cell

I'm using xlsx-js with nodejs, and I'm trying to read through an xlsx sheet with a calendar format. Where a 1 denotes that an activity had occurred during that day. I can loop through each row to see if it's undefined or not, but how do I loop up to…
Holly Do
  • 31
  • 1
  • 4
1
vote
1 answer

set Cell Style during export to excel in ui-grid

According to this link : http://plnkr.co/edit/w8w96ltypkxrZAWA54c1?p=preview I would set style to cell by this code : s: { fill:{bgColor: {rgb: "034221" }},font:{name:"Aharoni"}} but after downloading excel these styles are still not set.
0
votes
0 answers

Node xlsx Heap out of Memory

I currently have a large array of data that I need to write to a new Excel file, however every time that I close the stream to the file, the process fails with the error FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of…
RankinJ
  • 99
  • 10
0
votes
2 answers

ReactJS xlsx-js-style read local xls file

I have an imported file: import ExportReportCardTemplate from "asset/files/excel/report_card_template.xls"; How can I use it with library import * as xlsx from "xlsx-js-style"; I've searching but all I get is reading xls file with input, how can I…
Huan Huynh
  • 399
  • 6
  • 16
0
votes
0 answers

Write string with different color in one cell using SheetJS

How do I write a sentence with 2 color in one cell like this using SheetJs ?? Below is my code, Im writing the sheet using aoa_to_sheet const headerText1 = 'Device No. that in inserted in RWB but'; const headerText2 = 'NOT RETURN'; const…
0
votes
0 answers

JS xlsx json_to_sheet creates unwanted empty cells

I'm using this xlsx-js library to generate an Excel file from a list of json objects in a Vue3 application. I need to have values in multiple cells, but it seems that it skips rows which have been already "touched". Code: import * as XLSX from…
0
votes
1 answer

How to find the way to use SheetJS in AngularJS 1 dependency injection is not acceptable and error occurs

I cannot find anyone install the SheetJS to their AngularJS app with dependency injection. I just found the guy without dependency injection and as a plunker here. But how to import library into AngularJS 1.x app is cannot findable no documents…
-1
votes
1 answer

How to use the Office.JS API to link to a cell in another workbook using SheetJS

How to insert a link to a cell from another workbook in a cell? What should be the format? I tried: #'[WorkbookName]sheetName'!D4
Artem
  • 1
-1
votes
1 answer

How to read .xls with ExcelJS?

I'm having trouble reading a .xls file using the ExcelJS library. No problems reading .xlsx files. I used to use only the xlsx js library and did not have any issues reading .xls files. I was under the impression ExcelJS included xlsx library so my…
sychordCoder
  • 230
  • 3
  • 14