Skip to content

Commit ad5f8ed

Browse files
author
MarkBaker
committed
Merge branch 'master' into PhpBench-Performance-in-CI
# Conflicts: # composer.lock
2 parents e42edb7 + 97381d4 commit ad5f8ed

File tree

78 files changed

+4412
-1959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4412
-1959
lines changed

.github/workflows/main.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ jobs:
1313
- '8.0'
1414
- '8.1'
1515

16+
include:
17+
- php-version: '8.2'
18+
experimental: true
19+
1620
name: PHP ${{ matrix.php-version }}
1721

1822
steps:
@@ -39,7 +43,7 @@ jobs:
3943

4044
- name: Delete composer lock file
4145
id: composer-lock
42-
if: ${{ matrix.php-version == '8.1' }}
46+
if: ${{ matrix.php-version == '8.1' || matrix.php-version == '8.2' }}
4347
run: |
4448
rm composer.lock
4549
echo "::set-output name=flags::--ignore-platform-reqs"

CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
99

1010
### Added
1111

12+
- Added `removeComment()` method for Worksheet [PR #2875](https://github.com/PHPOffice/PhpSpreadsheet/pull/2875/files)
1213
- Add point size option for scatter charts [Issue #2298](https://github.com/PHPOffice/PhpSpreadsheet/issues/2298) [PR #2801](https://github.com/PHPOffice/PhpSpreadsheet/pull/2801)
1314
- Basic support for Xlsx reading/writing Chart Sheets [PR #2830](https://github.com/PHPOffice/PhpSpreadsheet/pull/2830)
1415

@@ -18,12 +19,19 @@ and this project adheres to [Semantic Versioning](https://semver.org).
1819
- Added Worksheet visibility in Ods Writer [PR #2850](https://github.com/PHPOffice/PhpSpreadsheet/pull/2850)
1920
- Allow Csv Reader to treat string as contents of file [Issue #1285](https://github.com/PHPOffice/PhpSpreadsheet/issues/1285) [PR #2792](https://github.com/PHPOffice/PhpSpreadsheet/pull/2792)
2021
- Allow Csv Reader to store null string rather than leave cell empty [Issue #2840](https://github.com/PHPOffice/PhpSpreadsheet/issues/2840) [PR #2842](https://github.com/PHPOffice/PhpSpreadsheet/pull/2842)
22+
- Provide new Worksheet methods to identify if a row or column is "empty", making allowance for different definitions of "empty":
23+
- Treat rows/columns containing no cell records as empty (default)
24+
- Treat cells containing a null value as empty
25+
- Treat cells containing an empty string as empty
2126

2227
### Changed
2328

29+
- Better enforcement of value modification to match specified datatype when using setValueExplicit()
30+
- Relax validation of merge cells to allow merge for a single cell reference [Issue #2776](https://github.com/PHPOffice/PhpSpreadsheet/issues/2776)
2431
- Memory and speed improvements, particularly for the Cell Collection, and the Writers.
2532

2633
See [the Discussion section on github](https://github.com/PHPOffice/PhpSpreadsheet/discussions/2821) for details of performance across versions
34+
- Improved performance for removing rows/columns from a worksheet
2735

2836
### Deprecated
2937

@@ -41,7 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
4149
- Time interval formatting [Issue #2768](https://github.com/PHPOffice/PhpSpreadsheet/issues/2768) [PR #2772](https://github.com/PHPOffice/PhpSpreadsheet/pull/2772)
4250
- Copy from Xls(x) to Html/Pdf loses drawings [PR #2788](https://github.com/PHPOffice/PhpSpreadsheet/pull/2788)
4351
- Html Reader converting cell containing 0 to null string [Issue #2810](https://github.com/PHPOffice/PhpSpreadsheet/issues/2810) [PR #2813](https://github.com/PHPOffice/PhpSpreadsheet/pull/2813)
44-
- Many fixes for Charts, especially, but not limited to, Scatter, Bubble, and Surface charts. [Issue #2762](https://github.com/PHPOffice/PhpSpreadsheet/issues/2762) [Issue #2299](https://github.com/PHPOffice/PhpSpreadsheet/issues/2299) [Issue #2700](https://github.com/PHPOffice/PhpSpreadsheet/issues/2700) [Issue #2817](https://github.com/PHPOffice/PhpSpreadsheet/issues/2817) [Issue #2763](https://github.com/PHPOffice/PhpSpreadsheet/issues/2763) [PR #2828](https://github.com/PHPOffice/PhpSpreadsheet/pull/2828) [PR #2841](https://github.com/PHPOffice/PhpSpreadsheet/pull/2841) [PR #2846](https://github.com/PHPOffice/PhpSpreadsheet/pull/2846) [PR #2852](https://github.com/PHPOffice/PhpSpreadsheet/pull/2852)
52+
- Many fixes for Charts, especially, but not limited to, Scatter, Bubble, and Surface charts. [Issue #2762](https://github.com/PHPOffice/PhpSpreadsheet/issues/2762) [Issue #2299](https://github.com/PHPOffice/PhpSpreadsheet/issues/2299) [Issue #2700](https://github.com/PHPOffice/PhpSpreadsheet/issues/2700) [Issue #2817](https://github.com/PHPOffice/PhpSpreadsheet/issues/2817) [Issue #2763](https://github.com/PHPOffice/PhpSpreadsheet/issues/2763) [Issue #2219](https://github.com/PHPOffice/PhpSpreadsheet/issues/2219) [PR #2828](https://github.com/PHPOffice/PhpSpreadsheet/pull/2828) [PR #2841](https://github.com/PHPOffice/PhpSpreadsheet/pull/2841) [PR #2846](https://github.com/PHPOffice/PhpSpreadsheet/pull/2846) [PR #2852](https://github.com/PHPOffice/PhpSpreadsheet/pull/2852) [PR #2856](https://github.com/PHPOffice/PhpSpreadsheet/pull/2856) [PR #2865](https://github.com/PHPOffice/PhpSpreadsheet/pull/2865) [PR #2872](https://github.com/PHPOffice/PhpSpreadsheet/pull/2872) [PR #2879](https://github.com/PHPOffice/PhpSpreadsheet/pull/2879)
4553

4654
## 1.23.0 - 2022-04-24
4755

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"phpstan/phpstan": "^1.1",
9292
"phpstan/phpstan-phpunit": "^1.0",
9393
"phpunit/phpunit": "^8.5 || ^9.0",
94-
"squizlabs/php_codesniffer": "^3.6",
94+
"squizlabs/php_codesniffer": "^3.7",
9595
"tecnickcom/tcpdf": "^6.4"
9696
},
9797
"suggest": {

composer.lock

+14-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/topics/recipes.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1348,14 +1348,31 @@ Removing a merge can be done using the unmergeCells method:
13481348
$spreadsheet->getActiveSheet()->unmergeCells('A18:E22');
13491349
```
13501350

1351-
## Inserting rows/columns
1351+
## Inserting or Removing rows/columns
13521352

13531353
You can insert/remove rows/columns at a specific position. The following
13541354
code inserts 2 new rows, right before row 7:
13551355

13561356
```php
13571357
$spreadsheet->getActiveSheet()->insertNewRowBefore(7, 2);
13581358
```
1359+
while
1360+
```php
1361+
$spreadsheet->getActiveSheet()->removeRow(7, 2);
1362+
```
1363+
will remove 2 rows starting at row number 7 (ie. rows 7 and 8).
1364+
1365+
Equivalent methods exist for inserting/removing columns:
1366+
1367+
```php
1368+
$spreadsheet->getActiveSheet()->removeColumn('C', 2);
1369+
```
1370+
1371+
All subsequent rows (or columns) will be moved to allow the insertion (or removal) with all formulae referencing thise cells adjusted accordingly.
1372+
1373+
Note that this is a fairly intensive process, particularly with large worksheets, and especially if you are inserting/removing rows/columns from near beginning of the worksheet.
1374+
1375+
If you need to insert/remove several consecutive rows/columns, always use the second argument rather than making multiple calls to insert/remove a single row/column if possible.
13591376

13601377
## Add a drawing to a worksheet
13611378

0 commit comments

Comments
 (0)