2.2.4.46.29 Worksheet::GetColFormats

Description

Gets the column formats of all the columns in the worksheet


Gets the column formats of all the columns in the worksheet.

Syntax

string GetColFormats( )


void GetColFormats( string & strFormats )

Parameters

strFormats
[output] String to hold formats

Return

A string containing all the column formats.


void

Examples

EX1

//Gets the column formats of all the columns in the worksheet 
void Worksheet_GetColFormats_Ex1()
{
    Worksheet wks;
    wks.Create();
    printf("Formats : %s\n", wks.GetColFormats());
}
//at the end of Example: "99"
//1st column - Text & Numeric (9)
//2nd column - Text & Numeric (9)


EX2

//Gets the column formats of all the columns in the worksheet 
void Worksheet_GetColFormats_Ex2()
{
    WorksheetPage wp = Project.WorksheetPages(0);
    if(!wp)
        return;
    
    Worksheet wks(wp.GetName());
    string strFormats;
    wks.GetColFormats(strFormats);
    printf("Formats : %s\n", strFormats);
}

Remark

Gets the column formats of all the columns in the worksheet. Same as GetColFormats() except that this method takes in a reference to a string as a parameter and returns nothing.

See Also

Worksheet::SetColFormats

Header to Include

origin.h