MarkBaker
Repos
48
Followers
486

Events

issue comment
Allowed memory size of xxx bytes exhausted with a small file
$reader->setReadEmptyCells(false);
Created at 1 day ago

Scrutinizer tweak

Created at 1 day ago

Excel Functions implementation method renaming

Created at 2 days ago
issue comment
Allowed memory size of xxx bytes exhausted with a small file

A small file does not necessarily mean a small number of cells; and remember that an Excel cell may contain an empty string, or a null value, or a formula that evaluates to these, so isn't necessarily visible when you look at the file in MS Excel itself.

Created at 2 days ago

Fix ezyang/htmlpurifier caret version range

Merge pull request #3086 from BrokenSourceCode/master

Fix ezyang/htmlpurifier caret version range

Minor tweak for phpstan and pathinfo return array

Merge remote-tracking branch 'origin/master'

Minor tweak for phpstan and pathinfo return array

Change Log

Change Log

Change Log

Prepare Change Log for next release

Merge branch 'master' into 2.0-Development

Created at 2 days ago

Resolve merge conflicts for master -> 2.0-dev

Created at 2 days ago

Add throws tag to writer::save

Do not remove @throws

Bugfix for Issue #3013, Named ranges not usable as anchors in OFFSET function

Update Change Log

Support for SimpleCache Interface versions 1.0, 2.0 and 3.0; to stop people moaning; even though it requires a second implementation of the Memory cache for Cells

Correct Namespaces in 11 Tests (#3020)

The setup for unit testing in Github in the "Install dependencies" log reports 11 members as "does not comply with with psr-4 autoloading standard." In each case, it is because the test namespace does not match the directory; in most cases, it was caused by the member being moved from one directory to another without changing the namespace declaration. No harm results from these problems, but there's also no reason to not correct them.

Merge branch 'master' into Cache-SimpleCache3-Support

Merge pull request #3019 from PHPOffice/Cache-SimpleCache3-Support

Support for SimpleCache Interface versions 1.0, 2.0 and 3.0

Minor changes, mainly cosmetic

Merge pull request #3025 from PHPOffice/Minor-Tweaks

Minor changes, mainly cosmetic

Explain that UoM = Unit of Measure (#3014)

Html Writer - Do Not Generate background-color When Fill is None (#3016)

  • Html Writer - Do Not Generate background-color When Fill is None

For PR #3002, I noted that there was a problem with Dompdf truncating images. I raised an issue with them (https://github.com/dompdf/dompdf/issues/2980), and they agree that there is a bug; however, they also suggested a workaround, namely omitting background-color from any cells which the image overlays. That did not at first appear to be a solution which could be generalized for PhpSpreasheet. However, investigating further, I saw that Html Writer is generating background-color for all cells, even though most of them use the default Fill type None (which suggests that background-color should not be specified after all). So this PR changes HTML Writer to generate background-color only when the user has actually set Fill type to something other than None. This is not a complete workaround for the Dompdf problem - we will still see truncation if the image overlays a cell which does specify a Fill type - however, it is almost certainly good enough for most use cases.

In addition to that change, I made the generated Html a little smaller and the code a little more efficient by combining the TD and TH styles for each cell into a single declaration and calling createCssStyle only once.

  • Revamp One Test

Look for both td.style and th.style instead of just td.style in test.

Charts - Add Support for Date Axis (#3018)

  • Charts - Add Support for Date Axis

Fix #2967. Fix #2969 (which had already been fixed prior to opening the issue, but had added urgency for Date Axes). Add ability to set axis type to date axis, in addition to original possiblities of value axis and category axis.

  • Update 33_Chart_create_line_dateaxis.php

No idea why php-cs-fixer is complaining. It didn't do so when I first uploaded. I can't duplicate problem on my own system. Not enough detail in error message for me to act. Grasping at straws, I have moved the function definition (which is the only use of braces in the entire script) from the end of the script to the beginning.

  • Update 33_Chart_create_line_dateaxis.php

Some comments were mis-aligned. This may be related to the reasons behind PR #3025, which didn't take care of this because this script had not yet been merged.

Correct Very Minor Error / Php8.2 Deprecation (#3021)

When Reader/Xlsx/WorkbookView was split off from Reader/Xlsx.php, one statement accidentally brought !empty($this->loadSheetsOnly) with it. That property does not exist in WorkbookView, so the test is useless (it is always empty); and, in fact, the caller passes its own version of loadSheetsOnly as a parameter, so it isn't needed even it did exist. In Php8.2, this might be a deprecation, although it hasn't shown up in the GitHub 8.2 tests. Fix it anyhow.

Implementation of the VALUETOTEXT() Excel Function

Merge pull request #3033 from PHPOffice/ExcelFunctions-ValueToText

Implementation of the VALUETOTEXT() Excel Function

Additional Properties for Trendlines (#3028)

Fix #3011. Some properties for Trendlines were omitted in the original request for this feature. Also, the trendlines sample spreadsheet included two charts. The rendering script 35_Chart_render handles this, but overlays the first output file with the second. It is changed to produce files with different names.

2 Minor Phpstan-related Fixes (#3030)

For one of the Phpstan upgrades, some message text had changed so drastically that the only practical solution at the time was to move the messages from phpstan-baseline.neon to phpstan.neon.dist. This was not ideal, but it allowed us time to move on and study the errors, which I have now done. At one point, Parser is expecting a variable to be an array, and that was not clear from the code. If not an array, the code will error out (which was Phpstan's concern); I have changed it to throw an exception instead. This satisfies Phpstan, and I can get the message out of neon.dist (without needing to restore it to baseline). Unsurprisingly, the exception was never thrown in the existing test suite, although I added a couple of tests to exercise that code.

In Helper/Dimension, Phpstan flagged a statement inappropriately. I suppressed the message using an annotation and filed a bug report https://github.com/phpstan/phpstan/issues/7563. A fix for the problem was merged yesterday, which is good, but it puts us in a tenuous position. The annotation is needed now, but, when the fix is inevitably pushed to the version we use, the no-longer-needed annotation will trigger a different message. Recode so that neither the current nor the future versions will issue a message, eliminating the annotation in the process.

Minor documentation updates

Phpstan Baseline < 4000 Lines Part 1 (#3023)

A lot of easily fixed problems throughout Writer/Xlsx/*, mostly supplying int rather than string as input to WriteAttribute/WriteElement. There are, in fact, so many opportunities, that I will split it over 2 or 3 PRs. But this first one will get Phpstan baseline down to the goal on its own.

Some of the other problems are also easily fixed. In particular, the docBlocks in Style/ConditionalFormatting/ConditionalDataBar do not allow for null values, and should.

Created at 2 days ago

Prepare Change Log for next release

Created at 3 days ago
`1.25.0` regression: `ezyang/htmlpurifier` composer dependency can not be installed

This is:

- [X] 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)

This regression is due to https://github.com/PHPOffice/PhpSpreadsheet/commit/a3921d20bc5c9a2ba6add05ad96fb41f873e36bd. The caret version range ^ is missing (https://getcomposer.org/doc/articles/versions.md#caret-version-range-).

What is the expected behavior?

The ezyang/htmlpurifier (v4.16) composer dependency should be installable.

What is the current behavior?

The ezyang/htmlpurifier (v4.16) composer dependency is not installable.

What are the steps to reproduce?

composer.json:

{
	"require": {
		"ezyang/htmlpurifier": "^4.16.0",
		"phpoffice/phpspreadsheet": "^1.25.0"
	}
}

Error occured when running the composer install command:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires phpoffice/phpspreadsheet ^1.25.0 -> satisfiable by phpoffice/phpspreadsheet[1.25.0].
    - phpoffice/phpspreadsheet 1.25.0 requires ezyang/htmlpurifier 4.15 -> found ezyang/htmlpurifier[v4.15.0] but it conflicts with your root composer.json require (^4.16.0).

Which versions of PhpSpreadsheet and PHP are affected?

v1.25.0

Created at 3 days ago
issue comment
`1.25.0` regression: `ezyang/htmlpurifier` composer dependency can not be installed

Thanks

Created at 3 days ago
MarkBaker create tag 1.25.2
Created at 3 days ago
MarkBaker create tag 1.25.1
Created at 3 days ago

Minor tweak for phpstan and pathinfo return array

Merge remote-tracking branch 'origin/master'

Minor tweak for phpstan and pathinfo return array

Created at 3 days ago
load template

This is: Fatal error: Constructor PhpOffice\PhpSpreadsheet\Reader\Xlsx\Styles::__construct() cannot declare a return type in D:\xampp\htdocs\dlogger\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Reader\Xlsx\Styles.php on line 18

- [ X] 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?

What is the current behavior?

What are the steps to reproduce?

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

<?php

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

// Create new Spreadsheet object
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();

// add code that show the issue here...

If this is an issue with reading a specific spreadsheet file, then it may be appropriate to provide a sample file that demonstrates the problem; but please keep it as small as possible, and sanitize any confidential information before uploading.

What features do you think are causing the issue

  • [x] Reader
  • [ ] Writer
  • [ ] Styles
  • [ ] Data Validations
  • [ ] Formula Calulations
  • [ ] Charts
  • [ ] AutoFilter
  • [ ] Form Elements

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

Which versions of PhpSpreadsheet and PHP are affected?

Created at 3 days ago

Fix ezyang/htmlpurifier caret version range

Merge pull request #3086 from BrokenSourceCode/master

Fix ezyang/htmlpurifier caret version range

Created at 3 days ago
pull request closed
Fix `ezyang/htmlpurifier` caret version range

This is:

- [x] a bugfix
- [ ] a new feature
- [ ] refactoring
- [ ] additional unit tests

Checklist:

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

Why this change is needed?

This change is needed to fix the regression https://github.com/PHPOffice/PhpSpreadsheet/issues/3085 caused by https://github.com/PHPOffice/PhpSpreadsheet/commit/a3921d20bc5c9a2ba6add05ad96fb41f873e36bd.

Created at 3 days ago
issue comment
Fix `ezyang/htmlpurifier` caret version range

Thank you for this

Created at 3 days ago

Prepare Change Log for next release

Created at 3 days ago
issue comment
The bug of transferring the list formula when inserting rows with the xlsx format

Should be resolved in release 1.25.0

Created at 3 days ago
issue comment
cannot install on laravel 9

Resolved in release 1.25.0

Created at 3 days ago
cannot install on laravel 9

This is:

- [x] 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?

Install on laravel 9

What is the current behavior?

installation error

What are the steps to reproduce?

Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:

composer require phpoffice/phpspreadsheet
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires phpoffice/phpspreadsheet ^1.24 -> satisfiable by phpoffice/phpspreadsheet[1.24.0, 1.24.1].
    - phpoffice/phpspreadsheet[1.24.0, ..., 1.24.1] require psr/simple-cache ^1.0 || ^2.0 -> found psr/simple-cache[1.0.0, 1.0.1, 2.0.0, 2.x-dev] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require phpoffice/phpspreadsheet:*" to figure out if any version is installable, or "composer require phpoffice/phpspreadsheet:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

If this is an issue with reading a specific spreadsheet file, then it may be appropriate to provide a sample file that demonstrates the problem; but please keep it as small as possible, and sanitize any confidential information before uploading.

What features do you think are causing the issue

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

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

Which versions of PhpSpreadsheet and PHP are affected?

php: 8.1.x
phpspreadsheet: latest version
Created at 3 days ago
Code explodes when inserting a column in ALL the DefinedNames example files

In all of the DefinedNames example files, inserting a column before column B causes the code to explode. For example in DefinedNames/AbsoluteNamedRange.php insert a column between column A and B at the end of the spreadsheet generation fails and the NamedRange get out of control.

..... ->setCellValue("B{$row}", $hours) ->setCellValue("C{$row}", "=B{$row}*CHARGE_RATE"); ++$row; } $endRow = $row - 1;

++$row; $worksheet ->setCellValue("B{$row}", "=SUM(B{$startRow}:B{$endRow})") ->setCellValue("C{$row}", "=SUM(C{$startRow}:C{$endRow})");

$worksheet->insertNewColumnBefore('B'); <------------------------ line inserted .....

the code explodes with error in cell coordinate.

Created at 3 days ago
issue comment
Code explodes when inserting a column in ALL the DefinedNames example files

Resolved in 1.25.0

Created at 3 days ago
MarkBaker create tag 1.25.0
Created at 3 days ago

1.25.0 - 2022-09-25

Added

  • Implementation of the new TEXTBEFORE(), TEXTAFTER() and TEXTSPLIT() Excel Functions
  • Implementation of the ARRAYTOTEXT() and VALUETOTEXT() Excel Functions
  • Support for mitoteam/jpgraph implementation of JpGraph library to render charts added.
  • Charts: Add Gradients, Transparency, Hidden Axes, Rounded Corners, Trendlines, Date Axes.

Changed

  • Allow variant behaviour when merging cells Issue #3065
    • Merge methods now allow an additional $behaviour argument. Permitted values are:
      • Worksheet::MERGE_CELL_CONTENT_EMPTY - Empty the content of the hidden cells (the default behaviour)
      • Worksheet::MERGE_CELL_CONTENT_HIDE - Keep the content of the hidden cells
      • Worksheet::MERGE_CELL_CONTENT_MERGE - Move the content of the hidden cells into the first cell

Deprecated

  • Axis getLineProperty deprecated in favor of getLineColorProperty.
  • Moved majorGridlines and minorGridlines from Chart to Axis. Setting either in Chart constructor or through Chart methods, or getting either using Chart methods is deprecated.
  • Chart::EXCEL_COLOR_TYPE_* copied from Properties to ChartColor; use in Properties is deprecated.
  • ChartColor::EXCEL_COLOR_TYPE_ARGB deprecated in favor of EXCEL_COLOR_TYPE_RGB ("A" component was never allowed).
  • Misspelled Properties::LINE_STYLE_DASH_SQUERE_DOT deprecated in favor of LINE_STYLE_DASH_SQUARE_DOT.
  • Clone not permitted for Spreadsheet. Spreadsheet->copy() can be used instead.

Removed

  • Nothing

Fixed

Created at 3 days ago