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
0
votes
1 answer

Save binary object to GridFS on Server

Usually I create XLSX binary object by loading data from MongoDb. This is then streamed to the client in a http response. This is the code I use which works perfectly. Server side code: //Row data (rows) generated from database conf.rows = rows; …
jqIndy
  • 414
  • 5
  • 11
0
votes
2 answers

Angular 7 and xlsx library how to export array with field name instead of index

Following on this question on stack, and this stackblitz, it seems that the material table does not fully exported to excel if the pagination is not showing all data. So instead, I will export the array as a whole, but the problem is that the main…
alim1990
  • 4,656
  • 12
  • 67
  • 130
0
votes
3 answers

How can I use an uploaded file?

I'm trying to use "workbook" variable outside "handleFile()" function. I know I can't return the workbook variable cause it's an async function and I tried to use promises but I don't know how to do it properly. Could you help me please! Please keep…
S Bogdan
  • 19
  • 2
0
votes
1 answer

XLSX.utils.table_to_book Currency Coming As General

I am doing XLSX.utils.table_to_book(document.getElementById(table), { sheet: "Sheet JS", raw: false }); Table as an HTML Table. However, one of my columns contains USD ($4.56) but is being read as General type in excel and not as currency.…
Steve Short
  • 85
  • 1
  • 12
0
votes
0 answers

How to return something in a function .onload added

I'm trying to import an excel file using SheetJS js-xlsx and I don't know how to return the variable workbook. Thanks! var rABS = true; // true: readAsBinaryString ; false: readAsArrayBuffer function handleFile(e) { var files = e.target.files,…
S Bogdan
  • 19
  • 2
0
votes
1 answer

SAPUI5 include pre included 3rd party software

In sapui5 fiori documentation mentioned that there are several no of 3rd patry libraries are pre-included. So I need to include this Xlsx library in to my sapui5 html5 application. What is the correct way of including these 3rd party libraries?…
tarzanbappa
  • 4,930
  • 22
  • 75
  • 117
0
votes
1 answer

js-xls - sheet to json on Angular returns only the first row

I have an xlsx file with this data: Totale venduto | Differenza | Totale incassato 3.354,95 | 16,73 | 3.371,68 This file is sended to a method readBlob as a BLOB, like in the following code: import { utils, write, read,…
Marco Barbero
  • 1,460
  • 1
  • 12
  • 22
0
votes
0 answers

Reading Excel files with SheetsJS js-xlsx in meteor (javascript)

I am having trouble trying to read an .xlsx file in my meteor application with xlsx. I tried to do this: const XLSX = require('xlsx'); /* Makes it possible to use the codes!*/ Template.Planning.onCreated(function() { var workbook =…
fangio
  • 1,746
  • 5
  • 28
  • 52
0
votes
1 answer

Convert HTML table to Excel file in pure JavaScript using sheets.js plugin

I couldn't find an existing question/answers on Stack Overflow for my particular issue so I'm posting this. I have an application written in HTML and jQuery/JavaScript. I need to export an HTML table into an Excel sheet using the jsxlsx (sheetsjs)…
Roger Dodger
  • 927
  • 2
  • 16
  • 37
0
votes
1 answer

Add a jason data to an existing sheet js-xlsx

From the example from js-xlsx, we know that after reading a file, we can add new data into that particular sheet: var XLSX = require('xlsx'); var wb = XLSX.readFile('sheetjs.xlsx'); add_cell_to_sheet(wb.Sheets.SheetJS, "F6",…
Coolguy
  • 2,225
  • 12
  • 54
  • 81
0
votes
1 answer

js-xlsx in knockout - pass sheet data back to page/viewmodel

Using the js-xlsx package, I'm reading in an excel file (successfully) from the page, but I'm stuck trying to pass that data back up the chain so the page can get the use of it. I've got a function written in the viewmodel that fires on change of…
VBartilucci
  • 477
  • 6
  • 17
0
votes
2 answers

For Loop in Protractor is not working properly

I am working on Protractor for testing the Angular JS application. I have written a code to read the data from excel sheet.My scenario is like I have a end to end flow that should execute.The code will take the URL,UserName and Password from the…
Vinee
  • 11
  • 2
  • 10
0
votes
1 answer

Not able to get right Sheets from huge xlsx files -- using NodeJS XLSX library

I'm trying to get the data from a huge file (800k rows) and put it into database via lambda (AWS). To do that I'm getting the xlsx file from S3 as a buffer and reading it. module.exports.getSalesData = new Promise((resolve, reject) => { …
Leo Ribeiro
  • 1,195
  • 1
  • 14
  • 25
0
votes
1 answer

Uncaught TypeError: jszip is not a constructor: How to write inline images to excel with JavaScript within AngularJs

The following approach works: https://jsfiddle.net/coolcatDev/Lhzdo2qp/ But once placed within the Angular Environment I get the following error: http://jsfiddle.net/coolcatDev/ADukg/17027/ I am using the following…
Al Ex Tsm
  • 2,042
  • 2
  • 29
  • 47
0
votes
1 answer

Upload excel files and consume data

I'm trying to create a moule where the user can upload an excel file an get data from the document. I'm using the js-xlsx library. Right now, with the next code, i'm getting the info on the console of my example file as a json: $scope.ExcelExport=…