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

Feature request: functionality to detect and read sheet tables and related styles #4020

Closed
bokrma opened this issue May 8, 2024 · 6 comments

Comments

@bokrma
Copy link

bokrma commented May 8, 2024

in order to fully use the repo. there should be away to detect and read the sheet tables and styles, specially when importing the files, because currently all sheets with tables are broken because of no table functionality exists

@oleibman
Copy link
Collaborator

oleibman commented May 8, 2024

Much table functionality has been added. If you find that it isn't working properly, please open a new issue so that we can take a look at it.

@bokrma
Copy link
Author

bokrma commented May 14, 2024

the issue is that when I import an Excel file that has table from Google or excel sheet, it doesn't identify those tables and cant detect them
please let me know how to detect them, and handle them on the importing functionality

@oleibman
Copy link
Collaborator

If you have a sample spreadsheet and code that demonstrates your problem, please upload it. Without that, there is nothing that I can do to help.

@bokrma
Copy link
Author

bokrma commented May 16, 2024

$this->worksheet->getTableNames(), and $this->worksheet->getTableCollection() not getting anything from this example sheet
and I cant identify the tables inside the sheet in any way
invoice (2).xlsx

Screenshot 2024-05-16 at 14 17 07

@oleibman
Copy link
Collaborator

Thank you for the spreadsheet. I am unable to duplicate your problem.

$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$spreadsheet = $reader->load('issue.4020.xlsx');
$worksheet = $spreadsheet->getActiveSheet();
var_dump($worksheet->getTableNames());

Output:

C:\git\issue.4020.php:12:
array(1) {
  [0] =>
  string(7) "Table_1"
}

What release of PhpSpreadsheet, and what release of Php, are you using? What else can you tell me about your environment?

@bokrma
Copy link
Author

bokrma commented May 24, 2024

oh i think there was problem with the version, thanks now I can get the names of the tables

@bokrma bokrma closed this as completed May 24, 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

2 participants