Reverted Scrutinzer fix in Xslx Reader listWorksheetInfo (#1895)
This commit is contained in:
parent
3e672710cd
commit
000e6088c9
|
|
@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org).
|
|||
|
||||
### Fixed
|
||||
|
||||
- Nothing.
|
||||
- Fixed issue with Xlsx@listWorksheetInfo not returning any data
|
||||
|
||||
## 1.17.1 - 2021-03-01
|
||||
|
||||
|
|
@ -697,4 +697,4 @@ For a comprehensive list of all class changes, and a semi-automated migration pa
|
|||
|
||||
## Previous versions of PHPExcel
|
||||
|
||||
The changelog for the project when it was called PHPExcel is [still available](./CHANGELOG.PHPExcel.md).
|
||||
The changelog for the project when it was called PHPExcel is [still available](./CHANGELOG.PHPExcel.md).
|
||||
|
|
|
|||
|
|
@ -187,7 +187,8 @@ class Xlsx extends BaseReader
|
|||
);
|
||||
if ($xmlWorkbook->sheets) {
|
||||
$dir = dirname($rel['Target']);
|
||||
foreach ($xmlWorkbook->sheets->sheet->children() as $eleSheet) {
|
||||
/** @var SimpleXMLElement $eleSheet */
|
||||
foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {
|
||||
$tmpInfo = [
|
||||
'worksheetName' => (string) $eleSheet['name'],
|
||||
'lastColumnLetter' => 'A',
|
||||
|
|
|
|||
|
|
@ -55,6 +55,25 @@ class XlsxTest extends TestCase
|
|||
}
|
||||
}
|
||||
|
||||
public function testListWorksheetInfo(): void
|
||||
{
|
||||
$filename = 'tests/data/Reader/XLSX/rowColumnAttributeTest.xlsx';
|
||||
$reader = new Xlsx();
|
||||
$actual = $reader->listWorksheetInfo($filename);
|
||||
|
||||
$expected = [
|
||||
[
|
||||
'worksheetName' => 'Sheet1',
|
||||
'lastColumnLetter' => 'F',
|
||||
'lastColumnIndex' => 5,
|
||||
'totalRows' => '6',
|
||||
'totalColumns' => 6,
|
||||
],
|
||||
];
|
||||
|
||||
self::assertEquals($expected, $actual);
|
||||
}
|
||||
|
||||
public function testLoadXlsxRowColumnAttributes(): void
|
||||
{
|
||||
$filename = 'tests/data/Reader/XLSX/rowColumnAttributeTest.xlsx';
|
||||
|
|
|
|||
Loading…
Reference in New Issue