Object Model


ExcelDna.Integration.ExcelIntegration 
ExcelDna.Integration.ExcelFunction
ExcelDna.Integration.XlCall
ExcelDna.Integration.ExcelError (enumeration)

Excel C API

The Excel C API is documented in the Excel XLL Software Development Kit, available from Microsoft here:
link - http://msdn.microsoft.com/en-us/library/office/bb687883.aspx
link - docs.excel-dna.net/excel-c-api/
Direct access to the C API is provided by Excel-DNA via two classes:


ExcelReference

ExcelDna.Integration.ExcelReference 

The ExcelReference class is a thin wrapper around the C API sheet reference information, and refers to a region (or multiple regions) on a specific sheet.
ExcelReference has helper methods to get and set the values in the region, but for additional information, specific C API calls must be made.
Using C API calls it is possible to get the address of an ExcelReference - calling XlCall.Excel(XlCall.xlfReftext, myReference, true) - and from there a COM Range object may be contructed.


XlCall

ExcelDna.Integration.XlCall 

Excel
xlfActiveCell
xlfCaller
xlfGetWorkspace
xlfSelection
xlcEcho
xlcFormatNumber
xlcFormulaGoto
xlcSelect
xlcWorkbookSelect
xlSheetNm



Other Objects



ExcelDna.Integration.IExcelAddIn 

ExcelDna.Integration.DnaLibrary 
ExcelDna.Integration.ExcelArgument
ExcelDna.Integration.ExcelArgumentAttribute
ExcelDna.Integration.ExcelAsyncHandle


ExcelDna.Integration.ExcelComAddIn 
ExcelDna.Integration.ExcelComAddInHelper
ExcelDna.Integration.ExcelCommandAttribute

ExcelDna.Integration.ExcelDnaUtil 
ExcelDna.Integration.ExcelDnaUtil.WindowHandle

Application - the correct Application root object
ExcelLimits
ExcelVersion
MainManagedThreadId
SupportsDynamicArrays
XllPath
XllPathInfo


ExcelDna.Integration.ExcelEmpty 

ExcelDna.Integration.ExcelError 

ExcelErrorNA


ExcelDna.Integration.ExcelErrorUtil 

ExcelDna.Integration.ExcelFunctionAttribute 

Description = ""
Name = ""
IsMacroType = false


ExcelDna.Integration.ExcelIntegration 

RegisterUnhandledExceptionHandler


ExcelDna.Integration.ExcelLimits 
ExcelDna.Integration.ExcelMissing
ExcelDna.Integration.ExcelReference
ExcelDna.Integration.ExcelSynchronizationContext
ExcelDna.Integration.ExternalLibrary
ExcelDna.Integration.IExcelObservable
ExcelDna.Integration.IExcelObserver
ExcelDna.Integration.Image
ExcelDna.Integration.Integration
ExcelDna.Integration.Project
ExcelDna.Integration.Reference
ExcelDna.Integration.SourceItem

ExcelDna.Integration.XlCallException 
ExcelDna.Integration.XlLibrary

public static object MyFunction(string code) 
{
  if (ExcelDnaUtil.IsInFunctionWizard() == true)
   {
    return "Uncalculated";
   }

   var results = method_ReturnTheValue();

   return results ?? ExcelDna.Integration.ExcelEmpty.Value;
}


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext