-
Notifications
You must be signed in to change notification settings - Fork 101
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
Error "The argument is invalid or missing or has an incorrect format." in Worksheet.getRanges #5198
Comments
Hi @matthiasgemmel, thx for reaching out here. I did a try and was able to repro. Mark it as #9628123 into our backlog. I will involve experts to investigate. Will reply here if any update. |
Thanks for letting me know you involved the experts. Happy to hear from them soon. @RuizhiSunMS , I hope this was sufficient to not auto close this bug while waiting for the Microsoft experts to comment on this bug. |
don't worry, no case would get closed automatically except it is tagged as 'need author feedback' for a long time. |
Hi @matthiasgemmel, Based on our investigation, there indeed exists a limitation on 8192 characters for the address string in this API you used。 And it shares the same limitation with formula limitation of Excel Application. Thanks again! |
Hi @SiruiSun-MSFT, Thanks for your answer and sharing the magic number 8192. Address strings with a length greater than this might work but it is not guaranteed. But address strings with a length lower than 8192 will always work. This is the important part for me. I will change the algorithm to cut strings into multiple ones if their address length exceeds 8192 characters. The const working_649Areas_stringLength9085 in my sample would then be split into two although it would work as one. But that is fine for me, I tested the change of the algorithm with my test workbook I used to extract the sample shared here. All cases work as expected without an error. Thus I close this issue as completed. Best regards |
Provide required information needed to triage your issue
Workshhet.getRanges returns error "The argument is invalid or missing or has an incorrect format." for a range address with multiple areas. But the limit of getRanges is unclear. With some addresses more than 500 areas work, with some not.
Your Environment
Expected behavior
An explanation when to split areas into multiple ranges.
Current behavior
Worksheet.getRanges returns an error without knowing what caused the error. The range address string is valid. The sample yaml contains one range with 513 areas that fails and another one with 513 that works. Thus area count seems not to be the issue. The failing range has total address string length of 8207. But a third example has 649 areas with total address string length 9085 which works for me in Excel Desktop (just tested this one fails as well with the same error in Excel Online).
Steps to reproduce
Link to live example(s)
yaml attached to thus bug report
Error_in_Worksheet.getRanges.zip
The text was updated successfully, but these errors were encountered: