- [ 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?
getMergeCells returns an array with all merged cells in the sheet
What is the current behavior?
getMergeCells returns empty value
What are the steps to reproduce?
<?php
require __DIR__ . '/vendor/autoload.php';
// Open Excel file
$spreadSheetFile = "Template.xls"
$reader = IOFactory::createReaderForFile($spreadSheetFile);
$reader->setReadDataOnly(true);
$spreadsheet = $reader->load($spreadSheetFile);
// Get first sheet
$formSheet = $spreadsheet -> getSheet(0);
$merged = $formSheet -> getMergeCells();
if(!empty($merged)) {
foreach($merged as $merge) {
var_dump($merge);
}
}
### What features do you think are causing the issue
- [X] 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?
I don't know.
I tried with the one attached
[Template.xlsx](https://github.com/user-attachments/files/17374218/Template.xlsx)
### Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 3.3.0
PHP 8.2
This is:
What is the expected behavior?
getMergeCells returns an array with all merged cells in the sheet
What is the current behavior?
getMergeCells returns empty value
What are the steps to reproduce?