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

Fixing bug of not being able to use vba=application and *args #1118

Merged
merged 1 commit into from Aug 11, 2019

Conversation

@sbremer
Copy link
Contributor

commented Jun 18, 2019

Bug: varargs does not work in combination with a "vba=" statement, for example to get the "Application" datastructure from excel.

Example:

@xw.arg('xl_app', vba='Application')
def vararg_func(xl_app, name, *args):
pass

Fix:
Changed the Python code that generates the vba function wrappers.
Just setting all "argsArray" elements separately did not work for datastructures like "Application".
Workaround: Build an Array(...) first, then Redim into desired size and fill with varargs.

Convention: varargs "*args" must be last in enumeration of arguments in Python!

Fixing bug of not being able to use vba=application and *args
Example:

@xw.arg('xl_app', vba='Application')
def vararg_func(xl_app, name, *args):
    pass

Convention: varargs "*args" must be past in enumeration of arguments!
@fzumstein

This comment has been minimized.

Copy link
Member

commented Jun 18, 2019

thanks - I'll try to review soon!

@fzumstein fzumstein merged commit fe1610c into xlwings:master Aug 11, 2019

fzumstein added a commit that referenced this pull request Aug 11, 2019

@fzumstein fzumstein added this to the 0.15.9 milestone Aug 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.