Invokes the controlled Excel instance and evaluates the named add-in function, using the specified 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: 7.0.9.1411 (7.0.9.1411)

Syntax

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

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.

Implements

IExcelWrapperEngine..::.CallExcelWithErrorCheck(String, Boolean, array<String>[]()[], array<Object>[]()[])
IWrapperEngine..::.CallExcelWithErrorCheck(String, Boolean, array<String>[]()[], array<Object>[]()[])

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