Add support for missing cell reference (#268)
When describing a cell, the cell reference (r="A1") is optional. When not present, we should just increment the index of the last processed row.
This commit is contained in:
1 parent
b02d13cd40
commit
ffea8871a6
3 files changed
+39
-2
No files matched your search
@@ -140,6 +140,21 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($expectedRows, $allRows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testReadShouldSupportFilesWithoutCellReference()
|
||||
{
|
||||
// file where the cell definition does not have a "r" attribute
|
||||
// as in <c r="A1">...</c>
|
||||
$allRows = $this->getAllRowsForFile('sheet_with_missing_cell_reference.xlsx');
|
||||
|
||||
$expectedRows = [
|
||||
['s1--A1'],
|
||||
];
|
||||
$this->assertEquals($expectedRows, $allRows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user