Skip to content
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

Add @xw.cache decorator for UDFs #1986

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

stenci
Copy link

@stenci stenci commented Aug 5, 2022

I was not able to tell Excel to use the repository code, so I edited the modules installed with pip from envs\xlwings\Lib\site-packages\xlwings\udfs.py and tested that the UDF import to Excel was working well.

When the import was working, I copied the code to the modules in the repository, committed and created the pull request.

I was not able to edit the xlwings.xlam file from the repository. In order for these changes to work, the following function must be added to the module utils.bas:

Function NewDictionary(ParamArray Args()) As Dictionary
  Dim I As Integer
  Set NewDictionary = New Dictionary
  For I = 0 To UBound(Args) Step 2
    NewDictionary.Add Args(I), Args(I + 1)
  Next I
End Function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant