2.2.4.5.16 Column::GetFormat

Description

Get the column format.

Syntax

int GetFormat( )

Parameters

Return

The column format, enum {

OKCOLTYPE_NUMERIC,

OKCOLTYPE_TEXT,

OKCOLTYPE_TIME,

OKCOLTYPE_DATE,

OKCOLTYPE_MONTH,

OKCOLTYPE_WEEKDAY,

OKCOLTYPE_COLUMN,

OKCOLTYPE_DATASET,

OKCOLTYPE_DATASET_X,

OKCOLTYPE_TEXT_NUMERIC,

OKCOLTYPE_CATEGORICAL,

OKCOLTYPE_PERCENTAGE,

OKCOLTYPE_CURRENCY,

OKCOLTYPE_STROBJ };

Examples

EX1

// Worksheet with at least one column must exist in project
void    Column_GetFormat_Ex1()
{
    WorksheetPage wp = Project.WorksheetPages(0);
    if(!wp)
        return;
    
    Worksheet wks(wp.GetName());
    int iFormat = wks.Columns(0).GetFormat();
    printf("Format of column %s is of type %u\n", wks.Columns(0).GetName(), iFormat);
}

Remark

Get the column format.

See Also

Column::SetFormat

Header to Include

origin.h