8.1.26.1 Worksheet::Columns

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

Return the columns collection.

Access the Columns collection by index

Access the Columns collection by name

Syntax

 Columns

 Columns(Index)
 Columns(ColName)

Parameters

Index
Column number with zero offset (< 0 refers to *Active* column). default is -1.
ColName
Column name

Return

a column

Examples

EX1

import PyOrigin
wks=PyOrigin.ActiveLayer()
cols=wks.Columns

EX2

import PyOrigin
#Assume a worksheet is active
wks=PyOrigin.WorksheetPages('Book1').Layers(0)
Col=wks.Columns(0)
Col.SetFormula('ran()')
Col.ExecuteFormula()