Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

support addressing excel sheets #118

Closed
tripodsan opened this issue Jul 8, 2020 · 4 comments · Fixed by #162
Closed

support addressing excel sheets #118

tripodsan opened this issue Jul 8, 2020 · 4 comments · Fixed by #162
Assignees
Labels
enhancement New feature or request released

Comments

@tripodsan
Copy link
Contributor

Is your feature request related to a problem? Please describe.
currently it is not possible to address a specific sheet in an excel workbook. Further it is not possible to define which sheet should be the default.

Describe the solution you'd like
use a query parameter, eg sheet= to select the sheet to fetch. in order to make it impossible to fetch sheets that are considered 'private', only sheets with helix- or helix_ prefix should be addressable.
furthermore, if there is a sheet names helix-default or helix_default, it should be used instead of the first sheet.

/cc @trieloff @davidnuescheler

@tripodsan
Copy link
Contributor Author

Similar to the sheet-names, that same should be applied to table names.

@davidnuescheler
Copy link

davidnuescheler commented Aug 25, 2020

i don't know that addressing sheets really is the correct approach, especially if we consider that there should be information in the excel or google sheet document that should not be exposed. however, instead of (or in addition to) the default behavior of serving the first sheet we should serve a sheet with a specific name, for example helix-default or similar.

using the first sheet is largely problematic for a couple of reasons:

(1) in real life there are usually a number of sheets in a "workbook" (to use excel terminology) and some of them will be manipulated by humans. in those cases the sheet that is output to helix is normally not the one for humans to make changes to. so from a sort order perspective the sheet that helix pulls should definitely not be the first (and possibly should even be hidden in some cases) as it really obstructs the human editor to get to the sheet that they can and should make changes to.

(2) there have been a number of incidents where someone moved a sheet by changing the sheet sort order resulting in a completely different json payload. this can yield catastrophic results depending on how material access to a specific json with a specific structure is for a particular website.

@tripodsan
Copy link
Contributor Author

exactly what I wrote in the description above :-)

@tripodsan tripodsan self-assigned this Aug 26, 2020
tripodsan added a commit that referenced this issue Aug 26, 2020
fixes #118

BREAKING CHANGE: the first sheet of an excel workbook is no longer
  returned by default, nor is the first table.
  Only sheets with the `helix-` prefix can be returned by data-embed.
  The sheet can be selected with the `sheet` request parameter,
  which defaults to `defaul`. i.e. If nothing specified, the sheet
  with the name `helix-default` is returned.
  By default the _used ranged_ of the selected sheet is returned.
  A table can be addressed usinf the `table` request parameter,
  which can be a table name or an index. For example, `table=Table1`
  will return the table with the name `Table1`, `table=1` will return
  the second table in the sheet. Note that specifying a table index
  will result in an additional request to lookup the table names.
tripodsan added a commit that referenced this issue Aug 26, 2020
fixes #118

BREAKING CHANGE: the first sheet of an excel workbook is no longer
  returned by default, nor is the first table.
  Only sheets with the `helix-` prefix can be returned by data-embed.
  The sheet can be selected with the `sheet` request parameter,
  which defaults to `default`. i.e. If nothing specified, the sheet
  with the name `helix-default` is returned.
  By default the _used ranged_ of the selected sheet is returned.
  A table can be addressed using the `table` request parameter,
  which can be a table name or an index. For example, `table=Table1`
  will return the table with the name `Table1`, `table=1` will return
  the second table in the sheet. Note that specifying a table index
  will result in an additional request to lookup the table names.
tripodsan added a commit that referenced this issue Aug 27, 2020
tripodsan added a commit that referenced this issue Aug 27, 2020
trieloff pushed a commit that referenced this issue Aug 27, 2020
# [1.9.0](v1.8.16...v1.9.0) (2020-08-27)

### Features

* **data:** add sheet addressing ([#162](#162)) ([59ed953](59ed953)), closes [#118](#118)
@trieloff
Copy link
Contributor

🎉 This issue has been resolved in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants