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

Fix missing font index with some XLS files #3734

Merged
merged 4 commits into from
Sep 18, 2023

Conversation

jenasnic
Copy link
Contributor

This is:

  • a bugfix (I got an error when trying to load an XLS file from an Italian agency : missing fonts? File can be easily opened in Microsoft Office or Open Office)
  • a new feature
  • refactoring
  • additional unit tests

Checklist:

  • Changes are covered by unit tests
    • Changes are covered by existing unit tests
    • New unit tests have been added
  • Code style is respected
  • Commit message explains why the change is made (see https://github.com/erlang/otp/wiki/Writing-good-commit-messages)
  • CHANGELOG.md contains a short summary of the change and a link to the pull request if applicable
  • Documentation is updated as necessary

Why this change is needed?

Provide an explanation of why this change is needed, with links to any Issues (if appropriate).
If this is a bugfix or a new feature, and there are no existing Issues, then please also create an issue that will make it easier to track progress with this PR.

@oleibman
Copy link
Collaborator

Is it possible for you to create a test case that works with your updated code but fails with the code you're replacing?

@jenasnic jenasnic force-pushed the patch-missing-font-index branch 5 times, most recently from a0ee029 to b296745 Compare September 15, 2023 13:06
@jenasnic
Copy link
Contributor Author

Hello.

Thanks for your quick response!
Here is a file to reproduce bug.
For GDPR reason, file has been anonymized using VIM (when editing/saving file with Microsoft Office or Open Office or LibreOffice, error disappears).
The original file comes from a customer in Italy and it has probably been created using Microsoft Excel (we ignore which version).

The error occurs when loading Spreadsheet (missing loaded fonts in PhpOffice\PhpSpreadsheet\Reader\Xls.php?) :

    $file = new \SplFileInfo('test_ko.xls');
    IOFactory::load($file);

I create TestCase as asking.

Best regards!

test_ko.xls

@jenasnic jenasnic force-pushed the patch-missing-font-index branch from b296745 to 638f627 Compare September 18, 2023 06:53
@oleibman oleibman merged commit b2d572c into PHPOffice:master Sep 18, 2023
@oleibman
Copy link
Collaborator

Thank you for your contribution.

@oleibman oleibman mentioned this pull request Jun 24, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants