XLL+ Class Library (6.3)

CXllApp::DefineBinaryName

Define a binary name in a worksheet and assign a block of data to it

static BOOL DefineBinaryName(
   const TCHAR* pszName,
   void* pData,
   size_t cbData
);
static BOOL DefineBinaryName(
   const TCHAR* pszWorkbook,
   const TCHAR* pszWorksheet,
   const TCHAR* pszName,
   void* pData,
   size_t cbData
);

Parameters

pszName

The name of the invisible range to add to the worksheet. The name must conform to Excel range name rules.

pData

A pointer to the data buffer containing the data which will be assigned to the BinaryName.

cbData

The number of bytes in the data buffer.

pszWorkbook

Name of target workbook.

pszWorksheet

Name of target sheet.

pszName
pData
cbData

Return Value

The function returns TRUE if the name is defined successfully, or FALSE if the operation fails.

Remarks

Binary names are invisible Excel named ranges, accessible only to the add-in programmer, not to the user. They differ from visible ranges in that you cannot us them for Excel data types, only for buffers of binary data.

Binary names are held in worksheets, and are unique at worksheet level. However, there may be multiple instances of a binary name in a workbook (as many as there are worksheets in the book).

The first form of the function acts on the active sheet of the active workbook.

The second form acts on the requested sheet. In order to do so, the active workbook and sheet are changed if required, and then changed back again after the action is complete.

Requirements

Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods | CXllApp::ClearBinaryName() | CXllApp::GetBinaryName()