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

Fetching (simple) table ranges from Excel sheet #2892

Closed
NiLon opened this issue Jun 15, 2022 · 2 comments
Closed

Fetching (simple) table ranges from Excel sheet #2892

NiLon opened this issue Jun 15, 2022 · 2 comments

Comments

@NiLon
Copy link

NiLon commented Jun 15, 2022

This is:

- [ ] a bug report
- [X] a feature request
- [X] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

Reading Excel tables doesn't seem to be supported because some corruption(?) issues. However, it would be still useful to get ranges (only reading) of the tables because that way data is still readable. Right now there is no way to get tables even listed.

In Python such solution exists:

from openpyxl import load_workbook
wb = load_workbook(filename)
ws = wb["Sheet1"]
print(ws.tables)

that outputs something like {'dSalesReps': 'A1:C26', 'dProduct': 'E1:I17', 'dCategory': 'K1:L6', 'dSupplier': 'N1:R5'}

Having method to get those table ranges would allow user to fetch data from them with rangeToArray() method.

@MarkBaker
Copy link
Member

MarkBaker commented Jun 15, 2022

Have a look at PR #2829... currently we support creating/writing tables (Xlsx only), but not reading them, and this new PR (which is likely to go in the next release) provides basic Reader support for tables with the Xlsx Reader

There's still a lot of work to do, even after that to provide support for calculated columns, and for Structured References in calculations, but it's ongoing development

@oleibman
Copy link
Collaborator

oleibman commented May 7, 2024

Closing. No update in 2 years, and Tables are now implemented.

@oleibman oleibman closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants