-
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
mb_substr() expects parameter 3 to be integer, string given #640
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. |
I'm experiencing a similar error: It seems to have something to do with this formula, which has worked fine when working with physical excel files. However, PHPspreadsheet throws this message if it is present. It sets the cell contents based on whatever the file name is. There is meant to be a part number before the text " = BOM (Costed).xls". Some files are named a little different, but the "=" is generally reliably located...so the formula searches for this and pulls a substring. |
I also experienced this error. It was caused by this function, where the result of the
The TextData's |
I have this issue too :( |
Sky93, |
I'm trying to create a simple excel with one formula. Like below: $spreadsheet = new Spreadsheet();
$spreadsheet->getActiveSheet()->setCellValue('A1', '=LEFT(CELL("filename", A1), FIND("[",CELL("filename",A1))-1)');
$writer = new Xlsx($spreadsheet);
$writer->save('sky.xlsx'); This formula works fine when you use it in an EXISTING excel file. I also tried to load an excel file and used
|
What does "FIND("[",CELL("filename",A1))" evaluate too? It's been a while since I poked at this issue...I don't remember if I resolved my original problem or maybe I found another solution. But...I kinda feel like "FIND" might be a common link. I don't have access to that project at the moment to verify what was happening with mine. Just kinda...trying to reconnect stale memories and guessing at my original train of thought. If your FIND evaluates to #VALUE!, maybe there is some difference in the way excel handles #VALUE! compared to phpoffice? |
This is:
What is the expected behavior?
Get calculated value from a cell
What is the current behavior?
Getting the Error -
mb_substr() expects parameter 3 to be integer, string given
when I am trying to get values as array usingtoArray()
What are the steps to reproduce?
I am trying to read the content from a sheet using this code
The sheet having a cell with this formula where the error occurs,
Which versions of PhpSpreadsheet and PHP are affected?
PHP
7.2
PHPOffice/PhpSpreadsheet -
^1.4
The text was updated successfully, but these errors were encountered: