ConvertXLRefToXLRef12
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
Framework function that attempts to convert an XLREF into an XLREF12.
BOOL ConvertXLRefToXLRef12(LPXLREF pxRef, LPXLREF12 pxRef12);
Parameters
pxRef (LPXLREF)
Pointer to the source reference structure.
pxRef12 (LPXLREF12)
Pointer to the target reference structure into which the converted value is to be placed.
Property Value/Return Value
TRUE if the conversion succeeded, FALSE otherwise.
Remarks
Provided that the passed-in XLREF is valid, this operation should always be successful. In contrast, conversion the other way from XLREF12 to XLREF, performed by ConvertXLRef12ToXLRef, fails if the supplied reference refers to part of a Microsoft Office Excel 2007 worksheet that is not supported in earlier versions.
Example
\SAMPLES\FRAMEWRK\FRAMEWRK.C
BOOL ConvertXLRefToXLRef12(LPXLREF pxref, LPXLREF12 pxref12)
{
if (pxref->rwLast >= pxref->rwFirst && pxref->colLast >= pxref->colFirst)
{
if (pxref->rwFirst >= 0 && pxref->colFirst >= 0)
{
pxref12->rwFirst = pxref->rwFirst;
pxref12->rwLast = pxref->rwLast;
pxref12->colFirst = pxref->colFirst;
pxref12->colLast = pxref->colLast;
return TRUE;
}
}
return FALSE;
}