8.1.3.16 DataObject:SetFormula

It is recommended that you switch to the originpro package. PyOrigin is primarily for users who need to work with Origin version prior to 2021.


Description

Set the LabTalk formula and optional Before Formula Script for Column and MatrixObject.

Syntax

SetFormula(Formula,AutoUpdate = AU_NONE, Begin = -1, End = -1)

Parameters

Formula
The string containing the formula expression.
AutoUpdate
AutoUpdate or not.
Begin
The begining Row number.
End
The endding Row number.

Return

True on success and False on failure.

Examples

import PyOrigin
wks=PyOrigin.WorksheetPages('Book1').Layers(0)
Col=wks.Columns(0)
Col.SetFormula('ran()')
Col.ExecuteFormula()

See Also

DataObject::GetFormula