Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sheet_to_row_object_array is not documented #424

Closed
dskrvk opened this issue Jun 8, 2016 · 8 comments
Closed

sheet_to_row_object_array is not documented #424

dskrvk opened this issue Jun 8, 2016 · 8 comments

Comments

@dskrvk
Copy link

dskrvk commented Jun 8, 2016

Function needs proper documentation, including what options it takes and e.g. the behavior when a sheet contains multiple columns with the same name.

@gbhasha
Copy link

gbhasha commented Jun 26, 2016

1.

Only below utils are mentioned in the readme file.

sheet_to_json converts a workbook object to an array of JSON objects.
sheet_to_csv generates delimiter-separated-values output
sheet_to_formulae generates a list of the formulae (with value fallbacks)

@LeonardoPatignio
Copy link

sheet_to_row_object_array is a parser function of sheet_to_json which both of them given a 'sheet' plus 'options'( optional param) and returns an 'array of rows with w as value inside'

function sheet_to_row_object_array(sheet, opts) {
return sheet_to_json(sheet, opts != null ? opts : {});
}

@reviewher
Copy link
Contributor

Looking at the history, originally there were separate functions to convert worksheets to different types of functions. As the use cases expanded, the complete function sheet_to_json took shape, but the original accessor was not removed. I am sure it will be removed in the future and the README will be updated to note that it is an alias.

@SheetJSDev please add a note to README and close the issue

SheetJSDev added a commit that referenced this issue Feb 3, 2017
- README and example cleanup
- basic XLSB and ODS write support
- flow typecheck for ODS file
  Note: xlsx.js flow fails: facebook/flow#380
- exposed jszip compression (fixes #220, closes #284)

README issues:

|  id  | author         | comment                                      |
|-----:|:---------------|:---------------------------------------------|
| #202 | @sao93859      | closes #202                                  |
| #211 | @alexanderchan | closes #211 corrected examples               |
| #327 | @cskaandorp    | changed saveAs example to match write tests  |
| #424 | @dskrvk        | added note about s2roa h/t @LeonardoPatignio |
| #496 | @jimmywarting  | closes #496 adapted rABS examples with rAAS  |

ODS file format issues:

|  id  | author         | comment                                      |
|-----:|:---------------|:---------------------------------------------|
| #148 | @user4815162342| closes #148 h/t @ziacik                      |
| #166 | @paulproteus   | closes #166 rudimentary ODS write support    |
| #177 | @ziacik        | closes #177                                  |
| #179 | @ziacik        | closes #179 use JSON when available          |
| #317 | @ziacik        | closes #317                                  |
| #328 | @think01       | closes #328                                  |
| #383 | @mdamt         | closes #383 duplicate cells should be copied |
| #430 | @RB-Lab        | closes #430                                  |
| #546 | @lgodard       | closes #546 thanks to other changes          |
@SheetJSDev
Copy link
Contributor

https://github.com/SheetJS/js-xlsx#json we included a section describing the sheet_to_* functions with some examples.

@dskrvk
Copy link
Author

dskrvk commented Mar 10, 2017

Awesome, thanks!

@gabeno
Copy link

gabeno commented Mar 16, 2017

I had to specify the sheet I am interested in thus:

console.log(X.utils.sheet_to_json(_ws.Sheet.Sheet1)

It is not clear in the docs. So is this the intended behaviour missing in the docs or I am missing something myself?

@SheetJSDev
Copy link
Contributor

@gabeno there's one general line in the enclosing section:

https://github.com/SheetJS/js-xlsx#utility-functions

The sheet_to_* functions accept a worksheet and an optional options object.

That line probably should be included in each of the subsections.

@gabeno
Copy link

gabeno commented Mar 17, 2017

Aha! @SheetJSDev I guess it would be helpful to perhaps use in the examples to provide better context of the line:

The sheet_to_* functions accept a worksheet and an optional options object.

saarCiklum pushed a commit to Folcon/js-xlsx that referenced this issue Aug 17, 2020
- README and example cleanup
- basic XLSB and ODS write support
- flow typecheck for ODS file
  Note: xlsx.js flow fails: facebook/flow#380
- exposed jszip compression (fixes SheetJS#220, closes SheetJS#284)

README issues:

|  id  | author         | comment                                      |
|-----:|:---------------|:---------------------------------------------|
| SheetJS#202 | @sao93859      | closes SheetJS#202                                  |
| SheetJS#211 | @alexanderchan | closes SheetJS#211 corrected examples               |
| SheetJS#327 | @cskaandorp    | changed saveAs example to match write tests  |
| SheetJS#424 | @dskrvk        | added note about s2roa h/t @LeonardoPatignio |
| SheetJS#496 | @jimmywarting  | closes SheetJS#496 adapted rABS examples with rAAS  |

ODS file format issues:

|  id  | author         | comment                                      |
|-----:|:---------------|:---------------------------------------------|
| protobi#148 | @user4815162342| closes protobi#148 h/t @ziacik                      |
| protobi#166 | @paulproteus   | closes protobi#166 rudimentary ODS write support    |
| protobi#177 | @ziacik        | closes protobi#177                                  |
| protobi#179 | @ziacik        | closes protobi#179 use JSON when available          |
| SheetJS#317 | @ziacik        | closes SheetJS#317                                  |
| SheetJS#328 | @think01       | closes SheetJS#328                                  |
| SheetJS#383 | @mdamt         | closes SheetJS#383 duplicate cells should be copied |
| SheetJS#430 | @RB-Lab        | closes SheetJS#430                                  |
| SheetJS#546 | @lgodard       | closes SheetJS#546 thanks to other changes          |
saarCiklum pushed a commit to Folcon/js-xlsx that referenced this issue Aug 18, 2020
- codepage upgraded to 1.7.0
- remove require dark pattern (closes SheetJS#554 h/t @keyiis)
- test for JSON header disambiguation
- utility functions documentation (fixes SheetJS#424 h/t @dskrvk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants