get_book_sheet_names

 

Description

check given string to see if in the form of [Book]Sheet1, if yes, break down and return book and sheet names

Syntax

bool get_book_sheet_names( const string & strBookSheet, string & strBook, string & strSheet )

Parameters

strBookSheet
[input] string in the form of [Book]Sheet
strBook
[output] resulting book short name
strSheet
[output] resulting sheet name

Return

true if given string is in the correct form, false if not.

strSheet can be empty if strBookSheet = [Book1]

Examples

EX1

void get_book_sheet_names_ex1()
{
    Worksheet wks;
    wks.Create();
    string strBookName  ;
    string strSheetName  ;
    
    string strBookSheetName = wks_get_book_sheet_name(wks);
    if(!get_book_sheet_names(strBookSheetName, strBookName, strSheetName))
        out_str("Fail");
}

Remark

See Also

header to Include

origin.h

Reference