-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
UDF functions cannot return df as table in VBA function #2438
Comments
What's your use case to do this instead of using |
I have very big functions with a Gurobi optimization. I need to give several parameters from the excel to run the optim, which doesn’t seem possible with RunPython
Best regards
Antoine de Bouillé | Gas data scientist intern | Mercuria Energy Trading SA | www.mercuria.com<http://www.mercuria.com/>
T: +33 6 64 16 92 15 | M: +33 6 64 16 92 15 | 50 Rue du Rhône | Geneva 1204, Switzerland
From: Felix Zumstein ***@***.***>
Sent: Friday, May 17, 2024 5:12 PM
To: xlwings/xlwings ***@***.***>
Cc: Antoine de Bouillé ***@***.***>; Author ***@***.***>
Subject: Re: [xlwings/xlwings] UDF functions cannot return df as table in VBA function (Issue #2438)
What's your use case to do this instead of using RunPython? See https://docs.xlwings.org/en/latest/quickstart.html#macros-call-python-from-excel<https://urldefense.com/v3/__https:/docs.xlwings.org/en/latest/quickstart.html*macros-call-python-from-excel__;Iw!!A41YHp6c7w!rEoFMtWmh5SoFAOtAtIkTUWOTu6ipzx-ilLBwzYqJ762opryhI0iqQisAm5TuBY8JsYJJJcYbghfYAMq76BWNI8aDA$>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/xlwings/xlwings/issues/2438*issuecomment-2117816912__;Iw!!A41YHp6c7w!rEoFMtWmh5SoFAOtAtIkTUWOTu6ipzx-ilLBwzYqJ762opryhI0iqQisAm5TuBY8JsYJJJcYbghfYAMq76AbvteK-Q$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BGIMT67ACIXJKAFT5X2DQULZCYM4LAVCNFSM6AAAAABH2N23COVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJXHAYTMOJRGI__;!!A41YHp6c7w!rEoFMtWmh5SoFAOtAtIkTUWOTu6ipzx-ilLBwzYqJ762opryhI0iqQisAm5TuBY8JsYJJJcYbghfYAMq76A4ySAv4A$>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
Please consider the environment before printing this email!
|
Please provide (pseudo) code that reflects your actual use case. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OS: Windows 10
Versions: xlwings 0.31.1, Python 3.10
Hello,
I have defined a UDF
py_return_df
which works great as an Excel function. However, I want to use it in a VBA code linked to a button.In this case I get error, while it is the same function. Moreover, I managed to use simple UDF in VBA, but the ones returning tables don’t seem to work in VBA.
Thanks in advance for your help
Python UDF function
VBA Sub
Error message in Excel
The text was updated successfully, but these errors were encountered: