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

splitted RichElements #476

Closed
antonioaltamura opened this issue Apr 28, 2018 · 2 comments · Fixed by #4094
Closed

splitted RichElements #476

antonioaltamura opened this issue Apr 28, 2018 · 2 comments · Fixed by #4094

Comments

@antonioaltamura
Copy link

antonioaltamura commented Apr 28, 2018

This is:

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

What is the expected behavior?

Not exactly a bug, it's a strange behaviour.
I want just 1 RichText object out of "Geneva Refugee Convention and Protocol"

What is the current behavior?

Two RichText objects: "Geneva Refugee Convention " and " and Protocol" with exactly the same proprieties (Font Object).

What are the steps to reproduce?

File: rich.xlsx

<?php
require __DIR__ . '/vendor/autoload.php';
$reader = new \PhpOffice\PhpSpreadsheet\Reader\Xlsx();
$spreadsheet = $reader->load("rich.xlsx");
$a1 = $spreadsheet->getActiveSheet()->getCell('A1');
print_r($a1->getValue()->getRichTextElements());

Which versions of PhpSpreadsheet and PHP are affected?

PHP: 7.2.4
phpspreadsheet: 1.2.1

@stale
Copy link

stale bot commented Jun 27, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If this is still an issue for you, please try to help by debugging it further and sharing your results.
Thank you for your contributions.

@stale stale bot added the stale label Jun 27, 2018
@stale stale bot closed this as completed Jul 4, 2018
@oleibman
Copy link
Collaborator

Reopening. Fix will be available in a day or two.

@oleibman oleibman reopened this Jul 11, 2024
@stale stale bot removed the stale label Jul 11, 2024
oleibman added a commit to oleibman/PhpSpreadsheet that referenced this issue Jul 12, 2024
Fix PHPOffice#476. Another in the "better late than never" series, closed as stale in June 2018. Xlsx Writer expects cells containing RichText to have DataType `TYPE_INLINE`; but the spreadsheet associated with the issue has the cell defined as `TYPE_STRING`. Change Writer to handle RichText TYPE_STRING appropriately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants