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

Get row count of excel sheet in nodejs

I have an excel which has multiple sheet. Now I want to get row count for each sheet var XLSX = require('xlsx'); var workbook = XLSX.readFile('test.xlsx'); var sheet_name_list = workbook.SheetNames; let count = []; for (var…
Akhilesh
  • 55
  • 2
  • 5
3
votes
2 answers

While exporting data to excel, date is changing according to timezone. How to avoid it?

When I try to export data to excel in angular, the date in database is in 'x' timezone and I'm exporting data from 'y' timezone. While data is getting exported to excel, date is in 'y' timezone. But i want to keep it same as date in database i.e,…
Vidya KS
  • 51
  • 5
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
1 answer

XLSX.utils.book_new() is not a function error

I am using SheetJS library to convert Excel to JSON and vice versa. While the code to convert Excel to JSON works fine, there are issues with the code to convert JSON back to Excel. Please find the code below: var wb =…
Ashy Ashcsi
  • 1,529
  • 7
  • 22
  • 54
3
votes
0 answers

"Uncaught TypeError: XLSX.read is not a function" when using SheetJS

I have used SheetJS js-xlsx library to load data from xlsx file into Fiori grid view. App is working when I run it using the SAP Hana Web IDE. Then I have deployed app to the Hana Cockpit and Register the app in Fiori LaunchPad as follows: The…
3
votes
0 answers

JQuery, FileSaver and SheetJS

I am trying to use SheetJS in order to push some js arrays to Excel. I looked at some tutorials and used the source code from SheetJS as an initial test. I have debugged and everything seems to work fine apart from the saveAs() method. Has anyone…
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
2 answers

Get excel column headers using SheetJS

I am currently creating a web application that allows a user to upload an excel file into a database but before the user uploads the file I would like to allow them to check the headers of the excel file if it matches the preset on the database.…
kendrickmundiz
  • 31
  • 1
  • 1
  • 3
3
votes
3 answers

SheetJS Uncaught Error: Cannot access file

I am trying to read XLSX file one cell data. but I get an error "Uncaught Error: Cannot access file" Uncaught Error: Cannot access file Hinnapakkumine.xlsx at V (xlsx.full.min.js:12) at qv (xlsx.full.min.js:22) at Object.eg (xlsx.full.min.js:22) at…
Sstenn
  • 91
  • 4
  • 9
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
2
votes
1 answer

How do I get import the original value from XLSX using SheetJS?

I am using Google Apps Script with SheetJS library to import table from XSLX file to my Google Sheet. Here is the code fragment: function IMPORTXLSX(url, sheetName, range) { const res = UrlFetchApp.fetch(url, { muteHttpExceptions: true }); if…
2
votes
1 answer

How to get the validations applied on a cell in an Excel file using javascript?

In ExcelJs package there is dataValidation or _dataValidation attribute for cell object. This gives the type of data in cell like list, dropdown, decimal, boolean etc. But, for some reason, it is throwing Javascript out of heap memory error for some…
user21938241
2
votes
1 answer

Google Sheets IMPORTDATA for xlsx files

I need to import some data that is stored online in xlsx file to my google spreadsheet. I have no problem using IMPORTDATA for csv files, but xlsx files are not supported. Sheet is filled with weird symbols, and my guess is that it is because xlsx…
2
votes
1 answer

Excel sum function not working after download with times as hh:mm:ss

After downloading the xlsx file, I need to sum time values and see the average, total, count etc in the status bar. I have attached the screenshot of current situation is showing 0. TS code public exportAsExcelFile(summary:any[], json: any[],…