Datasheet::FindCol

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

Get the number of columns in active worksheet.

Syntax

FindCol(Label, Begin = 0, Casesensitive = False, FullMatch = True, End = -1, AllowShortName = True)

Parameters

Label
string to search for column long name, also look for short name if bAllowShortName is True.
Begin
Column index (0 offset) to start searching. Its default value is 0.
CaseSensitive
True if case sensitive. Its default value is False.
FullMatch
False if only match substring, must set to True if AllowShortName is used. Its default value is True.
End
End of Column index for searching, when it is -1, search till the last of column. Its default value is -1.
AllowShortName
first check short name if True, when False, short name is ignored. Its default value is True.

Return

column

Examples

EX1

import PyOrigin
wks=PyOrigin.FindWorksheet('[Book1]Sheet1')
#Get the number of columns in active sheet
wks.Columns(0).SetLongName('Time')
wks.FindCol('Time').SetFormula('i')
wks.FindCol('Time').ExecuteFormula()