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
|
### Fixed
|
||||||
|
|
||||||
- Nothing.
|
- Fixed issue with Xlsx@listWorksheetInfo not returning any data
|
||||||
|
|
||||||
## 1.17.1 - 2021-03-01
|
## 1.17.1 - 2021-03-01
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,8 @@ class Xlsx extends BaseReader
|
||||||
);
|
);
|
||||||
if ($xmlWorkbook->sheets) {
|
if ($xmlWorkbook->sheets) {
|
||||||
$dir = dirname($rel['Target']);
|
$dir = dirname($rel['Target']);
|
||||||
foreach ($xmlWorkbook->sheets->sheet->children() as $eleSheet) {
|
/** @var SimpleXMLElement $eleSheet */
|
||||||
|
foreach ($xmlWorkbook->sheets->sheet as $eleSheet) {
|
||||||
$tmpInfo = [
|
$tmpInfo = [
|
||||||
'worksheetName' => (string) $eleSheet['name'],
|
'worksheetName' => (string) $eleSheet['name'],
|
||||||
'lastColumnLetter' => 'A',
|
'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
|
public function testLoadXlsxRowColumnAttributes(): void
|
||||||
{
|
{
|
||||||
$filename = 'tests/data/Reader/XLSX/rowColumnAttributeTest.xlsx';
|
$filename = 'tests/data/Reader/XLSX/rowColumnAttributeTest.xlsx';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue