函数向导中的参数类型验证 [英] Argument type validation in the Function Wizard
问题描述
如果我在这些字段中输入一个字符串代替一个数字,那么我在得到#VALUE!错误。
可以使用Excel-DNA实现类似的功能吗?
我不认为Excel支持一种显示用户定义函数类型的方法。 Excel-DNA 使用正确的类型注册函数(例如,采用Double)。 Excel完全控制在功能参数对话框中显示的内容,某些方面仅适用于内置函数,如强制参数(粗体显示)。
In Excel, the DATE function for example shows "=number" against each field.
If I enter a string in these fields in place of a number, I get the #VALUE! error.
Can similar functionality be achieved with Excel-DNA?
I don't think Excel supports a way to show those types for user-defined functions. Excel-DNA registers functions with the right types (like taking a Double). Excel completely controls how things are displayed in the Function Arguments dialog, and some aspects only work for built-in functions, like having mandatory parameters (displayed in bold).
这篇关于函数向导中的参数类型验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!