You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Versions of xlwings, Excel and Python (e.g. 0.11.8, Office 365, Python 3.7)
0.23.1, Office 365, Python 3.8.5
Describe your issue (incl. Traceback!)
I'm trying to develop an add-in with some udfs and I noticed that the line below (created by xlwings when of importing the udfs to the add-in) makes all udfs to return the value 0 at the opening of any workbook that makes use of them. After the workbook is opened, recalculating individually each formula returns the right value.
If (Not Application.CommandBars("Standard").Controls(1).Enabled) Then Exit Function
Removing the code line fixes the problem, but I'm wondering whether it creates a different one that I'm not aware of.
Best,
The text was updated successfully, but these errors were encountered:
This actually looks like a wrong default and handles whether the function should be called when opened in the wizard or not. By default that line should not be there, but only if you define a function with:
@xw.func(call_in_wizard=False)
accordingly, for a current workaround, set it to True.
fzumstein
changed the title
UDF recalculation when opening a workbook
Wrong calc_in_wizard default / UDF recalculation when opening a workbook
May 7, 2021
OS (e.g. Windows 10 or macOS Sierra)
Windows 10
Versions of xlwings, Excel and Python (e.g. 0.11.8, Office 365, Python 3.7)
0.23.1, Office 365, Python 3.8.5
Describe your issue (incl. Traceback!)
I'm trying to develop an add-in with some udfs and I noticed that the line below (created by xlwings when of importing the udfs to the add-in) makes all udfs to return the value 0 at the opening of any workbook that makes use of them. After the workbook is opened, recalculating individually each formula returns the right value.
If (Not Application.CommandBars("Standard").Controls(1).Enabled) Then Exit Function
Removing the code line fixes the problem, but I'm wondering whether it creates a different one that I'm not aware of.
Best,
The text was updated successfully, but these errors were encountered: