Oct 12 2023 02:24 AM
Hi everyone, I installed the Excel Labs add-in but when I try to save any Python code in a cell I get this error (in Italian): Save failed: The argument is not valid, is missing, or has an incorrect format.
I am attaching a screenshot:
Can anyone help me?
Thank You
Uccio
Oct 12 2023 02:41 AM
Hi @uccio991994,
Can you try running the code in a Python notebook or IDE to see if there are any errors?
If there are errors, then try to fix them and then try saving the code in Excel Labs again.
If there is no errors, than you can try this:
If you're still having trouble, you can post your code here so we can try to analyse it.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)
Oct 12 2023 03:15 AM
Hi, thanks for the reply.
I've tried everything you recommended but the problem persists.
Even with a simple code like:
a = "Hello"
the problem arises.
Thank you
Oct 12 2023 06:31 AM
Hi @uccio991994,
thanks for your update.
If you are still getting the error even with a simple code like "a = 'Hello'", then it is possible that there is a problem with your Excel installation or with your operating system.
To try to troubleshoot the problem, you can try the following:
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)
Oct 15 2023 08:33 AM
I'm having the same trouble that @uccio991994 is facing. I wrote the simple code below and the same error is showing up.
x=10
y=20
x+y
The interesting part is that with the office insider program, I'm able to run the 'PY' function and get the 'x+y' value. My operating system is up-to-date, and the office suite has been recently updated.
I suppose that having the latest python version is not always an option since library compatibility may be a problem in some cases.
With all the above in mind, do you have any other suggestions that may be causing the issue?
Oct 15 2023 09:29 AM
My guess that could be due to non-English version of Excel. There is nothing language dependant in the sample of the code, but Python editor is not localized. At least I can't reproduce on English version.
In any case that's better to communicate Excel team directly on GitHub Issues · microsoft/python-in-excel (github.com)