length of rows and cloumns #454

Closed
opened 2016-08-11 08:41:22 +00:00 by apawn · 3 comments
apawn commented 2016-08-11 08:41:22 +00:00 (Migrated from github.com)

todady ,i clone your lib to my project.
thanks for you contribution.
and i want to import my excel file to memeory,and when i use you lib,i find somthing not conventient,
ex; i want to excute the length of columns and rows,in order to do more complex task.
but i need to judge if the cell is null or undefined, and if the cell among others is empth,it hasn't any different with the cells that has been not contains in excel, it's the null or undefined.
sorry for my poor endlish.
thans you.

todady ,i clone your lib to my project. thanks for you contribution. and i want to import my excel file to memeory,and when i use you lib,i find somthing not conventient, ex; i want to excute the length of columns and rows,in order to do more complex task. but i need to judge if the cell is null or undefined, and if the cell among others is empth,it hasn't any different with the cells that has been not contains in excel, it's the null or undefined. sorry for my poor endlish. thans you.
reviewher commented 2017-02-21 18:55:07 +00:00 (Migrated from github.com)

The question makes sense. The worksheets have !ref fields which gives you the full range but doesn't tell you which columns have data, which rows have data, and how "long" each row or column is. The utility functions like sheet_to_json have to scan the worksheet and calculate these statistics.

It would be more efficient to directly calculate the values and store them somewhere in the sheet.

The question makes sense. The worksheets have `!ref` fields which gives you the full range but doesn't tell you which columns have data, which rows have data, and how "long" each row or column is. The utility functions like [sheet_to_json](https://github.com/SheetJS/js-xlsx/blob/master/bits/90_utils.js#L68) have to scan the worksheet and calculate these statistics. It would be more efficient to directly calculate the values and store them somewhere in the sheet.
SheetJSDev commented 2018-05-20 21:51:31 +00:00 (Migrated from github.com)

@apawn that question is not well defined in the general case (for example, in a sheet that contains multiple sub-tables, do you count the intermediate rows?). Converting with sheet_to_json with header:1 gives you an array of arrays of values that you can inspect directly.

@apawn that question is not well defined in the general case (for example, in a sheet that contains multiple sub-tables, do you count the intermediate rows?). Converting with `sheet_to_json` with `header:1` gives you an array of arrays of values that you can inspect directly.
hungdao-testing commented 2021-02-26 07:23:21 +00:00 (Migrated from github.com)

@SheetJSDev : I am using the sheet_to_json function to convert excel to json format for purposes.
The problem is, I need to specify the range to parse data, but don't have the function to get count Col, count Row.
Let say:
Sheet "Buying_Food" I need to parse from cel B2 (start_cell) to the F2(end_cell); but next day, the content team could add more columns, so the end_cell would be changed.
Therefore, it's better we could have another get last row, col has data, or some kind like that.

@SheetJSDev : I am using the sheet_to_json function to convert excel to json format for purposes. The problem is, I need to specify the range to parse data, but don't have the function to get count Col, count Row. Let say: Sheet "Buying_Food" I need to parse from cel B2 (start_cell) to the F2(end_cell); but next day, the content team could add more columns, so the end_cell would be changed. Therefore, it's better we could have another get last row, col has data, or some kind like that.
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#454
No description provided.