okoc_get_range_str

 

Description

Get range string

Syntax

int okoc_get_range_str( LPCSTR lpcszBookWks, int nCol, string * pstrRange, DWORD dwRule = 0 )

Parameters

lpcszBookWks
[input] [BookName]SheetName with optional terminating ! charactor
nCol
[input] column index, 0-offset
pstrRange
[output] range string
dwRule
[input] DRR_GET_DEPENDENT to get XY, DRR_GET_Z_DEPENDENT to get XYZ range

Return

0 if success, otherwise < 0 error codes

Examples

EX1

#include <okocUtils.h>
void okoc_get_range_str_ex1()
{
    string strRange = "[Book1]Sheet1!$A:$B" ;
    string  pstrRange ;
    int bRet = okoc_get_range_str(strRange, 1, &pstrRange, DRR_GET_DEPENDENT );
    if(0 == bRet)
        printf(" the range string is  %s\n" , pstrRange);
}

Remark

See Also

Header to Include

okocUtils.h

Reference