Share via


ConvertXLRef12ToXLRef

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.

Tries to convert an XLREF12 into an XLREF.

BOOL ConvertXLRefToXLRef12(LPXLREF12 pxRef12, LPXLREF pxRef);

Parameters

pxRef12 (LPXLREF12)

Pointer to the source reference structure.

pxRef (LPXLREF)

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

The conversion from XLREF12 to XLREF 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 ConvertXLRef12ToXLRef(LPXLREF12 pxref12, LPXLREF pxref)
{
   if (pxref12->rwLast >= pxref12->rwFirst && pxref12->colLast >= pxref12->colFirst)
   {
      if (pxref12->rwFirst >=0 && pxref12->colFirst >= 0)
      {
         if (pxref12->rwLast < rwMaxO8 && pxref12->colLast < colMaxO8)
         {
            pxref->rwFirst = (WORD)pxref12->rwFirst;
            pxref->rwLast = (WORD)pxref12->rwLast;
            pxref->colFirst = (BYTE)pxref12->colFirst;
            pxref->colLast = (BYTE)pxref12->colLast;
            return TRUE;
         }
      }
   }
   return FALSE;
}

See Also

Concepts

Functions in the Framework Library