We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using the INDIRECT function as the first parameter of the OFFSET function should allow the OFFSET function to use the range pointed by INDIRECT.
PhpSpreadsheet returns a rows/columns array from INDIRECT, and OFFSET cannot use it, expecting a string representing the cell addresses.
$filePath='Indirect named area for offset.xlsx'; $reader = IOFactory::createReader('Xlsx'); $spreadsheet = $reader->load($filePath); $cellName = 'RESULTCELL'; $namedRange = $spreadsheet->getNamedRange($cellName); if (!is_null($namedRange)) { var_dump($namedRange->getWorksheet()->getCell($namedRange->getCellsInRange()[0])->getCalculatedValue()); }
Observe the 0 result.
Here is an Excel file to reproduce this behavior with:
Indirect named area for offset.xlsx
Not to my knowledge. The affected file format is Xlsx.
PhpSpreadSheet: 4.1.0 PHP: 8.1
The text was updated successfully, but these errors were encountered:
Confirmed. This could be very difficult to fix.
Sorry, something went wrong.
No branches or pull requests
This is:
What is the expected behavior?
Using the INDIRECT function as the first parameter of the OFFSET function should allow the OFFSET function to use the range pointed by INDIRECT.
What is the current behavior?
PhpSpreadsheet returns a rows/columns array from INDIRECT, and OFFSET cannot use it, expecting a string representing the cell addresses.
What are the steps to reproduce?
Observe the 0 result.
Here is an Excel file to reproduce this behavior with:
Indirect named area for offset.xlsx
What features do you think are causing the issue
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
Not to my knowledge. The affected file format is Xlsx.
Which versions of PhpSpreadSheet and PHP are affected?
PhpSpreadSheet: 4.1.0
PHP: 8.1
The text was updated successfully, but these errors were encountered: