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

Content with <t xml:space="preserve"> get additional LF before and after text. #3725

Closed
14 tasks
fglueck opened this issue Sep 12, 2023 · 2 comments
Closed
14 tasks

Comments

@fglueck
Copy link

fglueck commented Sep 12, 2023

This is:

- [X] a bug report

What is the expected behavior?

only the content with spaces before and after would be returned

What is the current behavior?

Content This is:

- [X] a bug report

What is the expected behavior?

only the content with spaces before and after would be returned

What is the current behavior?

Content with get additional LF before and after text.

What are the steps to reproduce?

add spaces beforea/after the cell data, xlsx "sharedStrings.xml" will create:
XXXX

<?php

require __DIR__ . '/vendor/autoload.php';

// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
...
$cell = $wrks->getCellByColumnAndRow(1, 1);
echo "|{$cell->getValue()}|";

What features do you think are causing the issue

  • [*] Reader
  • Writer
  • Styles
  • Data Validations
  • Formula Calculations
  • Charts
  • AutoFilter
  • Form Elements

It look like, that the XML was formated (LF added) and than the content written to the value property.

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

only xlsx testet

Which versions of PhpSpreadsheet and PHP are affected?

current versionwith get additional LF before and after text.

What are the steps to reproduce?

add spaces beforea/after the cell data, xlsx "sharedStrings.xml" will create:
XXXX

<?php

require __DIR__ . '/vendor/autoload.php';

// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
...
$cell = $wrks->getCellByColumnAndRow(1, 1);
echo "|{$cell->getValue()}|";

What features do you think are causing the issue

  • [*] Reader
  • Writer
  • Styles
  • Data Validations
  • Formula Calculations
  • Charts
  • AutoFilter
  • Form Elements

It look like, that the XML was formated (LF added) and than the content written to the value property.

Does an issue affect all spreadsheet file formats? If not, which formats are affected?

only xlsx testet

Which versions of PhpSpreadsheet and PHP are affected?

current version

@oleibman
Copy link
Collaborator

I am sorry, I do not understand the problem. Are you saying that getValue is returning LF which is not in the spreadsheet cell? If so, can you provide the complete program which demonstrates the problem? I cannot tell from your sample what is supposed to be in the erroneous cell.

@fglueck
Copy link
Author

fglueck commented Sep 13, 2023

This issue was generated by tidy workaround for #3130/#3125. And it is not need any more because there was a fix some month ago.

@fglueck fglueck closed this as completed Sep 13, 2023
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