Questions tagged [sheetjs]

A pure JavaScript library to read, parse, edit, and write spreadsheets, or to convert them to different formats like JSON.

You can find more information at

277 questions
2
votes
2 answers

Vue.js excel to json

i tried to read the excel files with vue.js but u can once i read the file the memory start to sky rocket like 5 gb ram and i the excel file is feairly small pls help need to convert the file to json The vue method to handle the excel file i tried…
shaked
  • 561
  • 7
  • 19
2
votes
1 answer

electron sheetjs download generated file from JSON

I have an Electron app with VueJS and I try to download a generated XLS with sheetjs but the provided workaround does not work in my case. Here is what I have been trying: exportData(id, type) { // eslint-disable-next-line no-console …
fefe
  • 8,755
  • 27
  • 104
  • 180
2
votes
0 answers

Cannot read property '0' of undefined - While reading xls file

I'm trying to read excel data in angular 7. Below is the code. import * as XLSX from 'xlsx'; arrayBuffer: any; file: File; incomingfile(event) { let files = event.target.files; this.file = files[0]; } Upload() { let fileReader = new…
Ravi
  • 881
  • 1
  • 9
  • 23
2
votes
2 answers

Read a file with XLSX.readFile

In Typescript, I've got the error "Cannot read property 'replace' of undefined" executing: const xlsx = XLSX.readFile(fileName); filename is a path to an existing file; I've read that "readFile is only available in server environments. Browsers…
user1
  • 556
  • 2
  • 6
  • 22
2
votes
1 answer

How to use file from in SheetJS's XSLX?

I want to be able to upload .xlsx file to webpage to later use values from .xlsx's cells in javascript code. How can I combine code and SheetJS's XLSX to do that?
2
votes
1 answer

How i remove column using xlsx library in angular application

How to remove the last column from a table using the xlsx library? I'm saving my table from my angular application, but I wanted to remove the last column named "description" because it's just an action column, it only contains icons, but when…
Allison1
  • 57
  • 3
  • 9
2
votes
1 answer

How to export data to a TSV file using SheetJS on the client?

Going through the SheetJS docs, I noticed exporting to a csv file is supported. And I have the working code, to convert an array of objects into a file and start the download: let workSheet = XLSX.utils.json_to_sheet(rows); let workBook =…
Andriy Stolyar
  • 585
  • 9
  • 21
2
votes
1 answer

How to set column width of XLSX worksheet in angular4

I am Converting HTML to XLSX sheet in angular using SheetJS. But the width of each column is 256 only, I want to increase it I have tried using ws[!cols] of ColInfo but not able to correctly implement it or set it 'wch' & 'width' let worksheet:…
2
votes
2 answers

SheetJS (js-xlsx) in browser: read a workbook from a Blob

I am running into a wall trying to use SheetJS to build a Workbook object from a Blob, as opposed to a client event like a drag-and-drop or file input element event. The latter two are covered in the documentation's examples but I lack the JS-fu…
Marc L.
  • 3,296
  • 1
  • 32
  • 42
2
votes
3 answers

SheetJS shows blank rows

Im using SheetJS when i upload the file xlsx using the method _file(file) { /* Boilerplate to set up FileReader */ const reader = new FileReader(); reader.onload = (e) => { /* Parse data */ const bstr = e.target.result; …
Beginner
  • 1,700
  • 4
  • 22
  • 42
2
votes
1 answer

How to parse with column from excel to convert it to JSON

I have tried to display the json value from the table. But it creates the JSON from Excel (Which parse as an row) I would like to parse the excel data as an column wise. Please help on this. I am using angular to parse. Upload() { …
Idris
  • 381
  • 2
  • 7
  • 16
2
votes
1 answer

Filereader read file using correct encoding when read as readAsArrayBuffer

I am working on reading .csv /xlsx file uploaded using javaScript and get the result as array containing each row . I was able to read the file and get data using FileReader and SheetJs with following code. // code for the new excel…
Joel Joseph
  • 5,889
  • 4
  • 31
  • 36
1
vote
0 answers

SheetJS/sheetjs | Using '\t' instead of ',' as delimiter for reading rows in excel file

I am using https://github.com/SheetJS/sheetjs for getting data and parsing into javascript objects. I do not want to use the default ',' separator but use '\t' for reading the string passed into the API. Is there any way i can pass '\t' as options…
Raj
  • 91
  • 5
1
vote
0 answers

How to access a spreadsheet in local file system using a chrome extension?

I want to create a chrome extension that create a spreadsheet once installed on the browser and then get the path of this spreadsheet file and be ready to update that spreadsheet according to user interactions, i am using sheet.js to create and…
Code Eagle
  • 1,293
  • 1
  • 17
  • 34
1
vote
0 answers

Receiving Amazon Inspector Vulnerability for xlsx, even after it has been updated to the version it asks for, any idea why?

Currently during my normal scans I am receiving a high vulnerability on my front end ECR image. It is showing: As you can see it registers the installed version equal to the fixed version. My npm package has the following: "xlsx":…
user68288
  • 702
  • 2
  • 6
  • 27