XLSX.read miss cell #1983

Closed
opened 2020-06-05 02:22:50 +00:00 by 136323000 · 7 comments
136323000 commented 2020-06-05 02:22:50 +00:00 (Migrated from github.com)

I have a csv like this:

data
1
2

I use following code to read it
var reader = new FileReader();
reader.onload = function (e) {
var data = new Uint8Array(e.target.result);
var workbook = XLSX.read(data, { type: 'array' });
console.log(workbook)
};
reader.readAsArrayBuffer(file);

When I console.log(workbook) I expect get data like this:
Sheet1:
!ref: "A1:A3"
A1: {v: "data", t: "s"}
A2: {v: 1, t: "n"}
A3: {v: 2, t: "n"}

But I got the following data
Sheet1:
!ref: "A1:A5"
A1: {v: "data", t: "s"}
A3: {v: 1, t: "n"}
A5: {v: 2, t: "n"}

Why?? where is A2? Why miss A2?

I have a csv like this: data 1 2 I use following code to read it var reader = new FileReader(); reader.onload = function (e) { var data = new Uint8Array(e.target.result); var workbook = XLSX.read(data, { type: 'array' }); console.log(workbook) }; reader.readAsArrayBuffer(file); When I console.log(workbook) I expect get data like this: Sheet1: !ref: "A1:A3" A1: {v: "data", t: "s"} A2: {v: 1, t: "n"} A3: {v: 2, t: "n"} But I got the following data Sheet1: !ref: "A1:A5" A1: {v: "data", t: "s"} A3: {v: 1, t: "n"} A5: {v: 2, t: "n"} Why?? where is A2? Why miss A2?
SheetJSDev commented 2020-06-05 02:26:29 +00:00 (Migrated from github.com)

Can you share the bytes of the file? console.log(data) just before the XLSX.read call, expand the console so you can see the numbers, and take a screenshot

Can you share the bytes of the file? `console.log(data)` just before the `XLSX.read` call, expand the console so you can see the numbers, and take a screenshot
136323000 commented 2020-06-05 02:40:23 +00:00 (Migrated from github.com)

image

![image](https://user-images.githubusercontent.com/49808133/83830949-f2a25500-a718-11ea-9cfd-ec03815a9392.png)
136323000 commented 2020-06-05 02:43:13 +00:00 (Migrated from github.com)

您可以共享文件的字节吗? console.log(data)XLSX.read通话之前,展开控制台,以便您可以看到号码并截图

WWW.zip

> 您可以共享文件的字节吗? `console.log(data)`在`XLSX.read`通话之前,展开控制台,以便您可以看到号码并截图 [WWW.zip](https://github.com/SheetJS/sheetjs/files/4733623/WWW.zip)
136323000 commented 2020-06-05 02:44:31 +00:00 (Migrated from github.com)

image
image

![image](https://user-images.githubusercontent.com/49808133/83831211-7fe5a980-a719-11ea-9ede-5e18fd5722b2.png) ![image](https://user-images.githubusercontent.com/49808133/83831224-870cb780-a719-11ea-9ab7-ecbb2965f91a.png)
136323000 commented 2020-06-05 02:55:30 +00:00 (Migrated from github.com)

this is my codeThank you very much
WWW.zip

this is my codeThank you very much [WWW.zip](https://github.com/SheetJS/sheetjs/files/4733650/WWW.zip)
SheetJSDev commented 2020-06-05 03:21:32 +00:00 (Migrated from github.com)

This has the same root cause as #1976 , and #1977 should fix the issue

This has the same root cause as #1976 , and #1977 should fix the issue
136323000 commented 2020-06-05 03:32:50 +00:00 (Migrated from github.com)

This has the same root cause as #1976 , and #1977 should fix the issue

ok thankyou verymuch

> This has the same root cause as #1976 , and #1977 should fix the issue ok thankyou verymuch
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#1983
No description provided.