-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
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
OFFSET() returns #REF! if height and width are omitted #561
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Fixed by #565 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Commit 8dddf56 inadvertently removed the ability to omit the width and height arguments to the OFFSET function. And #REF! is returned because the function is validating that the new $pCell argument is present. It is present, but it has been passed in the $height position. We fixed this by always passing $pCell at the last position and filling missing arguments with NULL values. Fixes #561 Fixes #565
This is:
What is the expected behavior?
Optional width and height as in =OFFSET(range, 0, 2) should be supported as documented.
What is the current behavior?
#REF! is returned because the function is validating that the new $pCell argument is present. It is present, but it has been passed in the $height position.
Before commit [8dddf56] the $pCell was popped off the end of the argument list, this behaviour should be retained.
What are the steps to reproduce?
Please provide a Minimal, Complete, and Verifiable example of code that exhibits the issue without relying on an external Excel file or a web server:
Which versions of PhpSpreadsheet and PHP are affected?
The text was updated successfully, but these errors were encountered: