3.7.5.103.14 wks.col.formula$

Syntax

wks.col.formula$

Type

string

Access

Read/write

Description

Column formula as in Set (Column) Values or in F(x)= label row (see also Column Label Row Characters).

Examples

EX1

// Set col(1)'s short name in active sheet as "Time"
wks.col1.name$ = Time;

// You can reference another book, but the target sheet must still be active
// Set column 5 in the active sheet of Book5 to be an X column
Book5!wks.col5.type = 4;

// col0 to refer to last column
//set last column formula
wks.col0.formula$="A";

EX2

Access Python Function in Set (Column) Values
//define function in python field
wks.col2.py$=
"def add1(a):
    return [val+1 for val in a]
";

//use the function above in column formula
wks.col2.formula$="py.add1(A)";


See also

wks.col.setformula, wks.col.py$, wks.col.script$