-
Notifications
You must be signed in to change notification settings - Fork 19
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
How to implement Optional parameters (with default values) and Nullable parameters #21
Comments
There are lots of parameter-related examples here: Where are you stuck? |
Do I need to register these functions separately in a special way? |
I have a another question, how to get the Worksheet where Range is located via ExcelReference? |
To use the Excel-DNA Registration extensions (which support optional parameters) you need to change your project to use 'explicit registration'. See the walkthrough here: https://github.com/Excel-DNA/Registration/blob/master/README.md |
Govert, thanks a lot for your work, but this part is not clear enough. Are optional arguments still a work in progress? (you're mentioning here some casting issues: https://github.com/Excel-DNA/Registration/blob/master/Source/Samples/Registration.Sample/ParameterConversionExamples.cs Otherwise, could you amend the documentation and give some examples? E.g. When setting defaults as in the example above |
@lbnewre When I run the Registration sample, the optional string function works fine, and I get see the default value returned to Excel when calling it as Have you tested the Registration sample? I think there are some quirks with the conversions in some cases, but optional strings with defaults work in the Registration sample on my computer. |
the samples have been moved to https://github.com/Excel-DNA/Samples/blob/master/Registration.Sample/ParameterConversionExamples.cs |
how to use this function? Give an example?
•Optional parameters (with default values), 'params' parameters and Nullable parameters
Give an example?
Thanks!
The text was updated successfully, but these errors were encountered: