Add support for files containing formulas

Formulas will be skipped on reading.
The result of the formulas will be kept though.
This commit is contained in:
Adrien Loison committed 2015-05-29 09:01:28 -07:00
1 parent 8a45cec220
commit b21bb86682
3 files changed
+31 -4

No files matched your search

+15
View File
@@ -245,6 +245,21 @@ class XLSXTest extends \PHPUnit_Framework_TestCase
$this->assertEquals([], $allRows, 'Sheet with no cells should be correctly processed.');
}
/**
* @return void
*/
public function testReadShouldSkipFormulas()
{
$allRows = $this->getAllRowsForFile('sheet_with_formulas.xlsx');
$expectedRows = [
['val1', 'val2', 'total1', 'total2'],
[10, 20, 30, 21],
[11, 21, 32, 41],
];
$this->assertEquals($expectedRows, $allRows);
}
/**
* @param string $fileName
* @return array All the read rows the given file