question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong number parsing

See original GitHub issue

I got wrong number parsing result when import from excel. My result image

SSF format image

My handle code

`handleFile(e) { var files = e.target.files, f = files[0]; var reader = new FileReader(); var rABS = true var _this = this; reader.onload = function(e) { var data = e.target.result; if(!rABS) data = new Uint8Array(data); var workbook = XLSX.read(data, {type: rABS ? ‘binary’ : ‘array’});

		  /* DO SOMETHING WITH workbook HERE */
		  _this.to_json_first_sheet(workbook)
		  console.log(workbook)
		};
		if(rABS) reader.readAsBinaryString(f); else reader.readAsArrayBuffer(f);
	}

to_json_first_sheet: function(workbook){ var result = {}; var _this = this; var sheetName = workbook.SheetNames[0]; var roa = _this.X.utils.sheet_to_json(workbook.Sheets[sheetName],{}); console.log(roa) if(roa.length) result = roa; return result; } `

My excel file ( github doesn’t accept xls file so I updated it into google driver) https://drive.google.com/file/d/1l1TLlycLpYjrhWzpO5fUipp-UCO49rzU/view

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SheetJSDevcommented, Dec 1, 2017

@ToujouAya we are releasing 0.11.11 right now with the fix. Give it some time to show up on NPM and CDNs. Your code should work as-is.

0reactions
ToujouAyacommented, Dec 1, 2017

@SheetJSDev Oh thank you so much. I appreciate

Read more comments on GitHub >

github_iconTop Results From Across the Web

JS wrong number parsing from string [duplicate] - Stack Overflow
I'm trying to parse a big int (int64) from a string... I've set up a little test, and I'm getting the wrong number...
Read more >
PLS-00306: wrong number or types of arguments tips
PLS-00306: wrong number or types of arguments in call to 'string' · Cause: This error occurs when the named subprogram call cannot be...
Read more >
Invalid number when parsing JSON ouput · Issue #331 - GitHub
Hello, We are using pplacer inside of PhyloSift and an error recently started showing up. Our JSON parser gives us the following error....
Read more >
Formula Parse Errors: What They Are & How to Fix Them
A formula parse error happens when you enter a formula into a cell, and the spreadsheet software cannot understand what you want it...
Read more >
ACT parsing incorrectly/showing wrong numbers? : r/ffxiv
ACT parsing incorrectly/showing wrong numbers? Hi so I noticed act numbers being lower (not extremely low just a bit lower) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found