Invokes the controlled Excel instance and evaluates the named add-in function, using the specifed parameter list of arguments, and raises an error under the conditions specified.

Namespace:  XllPlus.ComWrappers.Runtime
Assembly:  XllPlus.ComWrappers.Runtime (in XllPlus.ComWrappers.Runtime.dll) Version: 6.3.4.831 (6.3.4.0831)

Syntax

C#
Object CallExcelWithErrorCheck(
	string fnName,
	bool raiseExceptionOnExcelError,
	string[] errorStringPrefixes,
	params Object[] arguments
)
Visual Basic (Declaration)
Function CallExcelWithErrorCheck ( _
	fnName As String, _
	raiseExceptionOnExcelError As Boolean, _
	errorStringPrefixes As String(), _
	ParamArray arguments As Object() _
) As Object
Visual C++
Object^ CallExcelWithErrorCheck(
	String^ fnName, 
	bool raiseExceptionOnExcelError, 
	array<String^>^ errorStringPrefixes, 
	... array<Object^>^ arguments
)

Parameters

fnName
Type: System..::.String
The name of the function, as visible in Excel.
raiseExceptionOnExcelError
Type: System..::.Boolean
If true, then when Excel returns an error value, such as #VALUE!, an error is raised. If false, then the error value is returned.
errorStringPrefixes
Type: array< System..::.String >[]()[]
If not null or empty, then if Excel returns a string value which begins with any of these prefixes, an error is raised.
arguments
Type: array< System..::.Object >[]()[]
The arguments to the add-in function.

Return Value

The variant type returned by Excel.

Exceptions

ExceptionCondition
XllPlus.ComWrappers.Runtime..::.XllWrapperExceptionThrown if Excel is unable to call the function, or if Excel rejects the inputs, or if Excel returns an error value (e.g. #VALUE!) or if a string result containing an error description is returned.

See Also