8.1.26.14 Worksheet::InsertCol

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

Insert an empty column in the worksheet with the given name and store the name in a string. If the given name already exists then increment it. The actual name created is returned by reference

Syntax

InsertCol(Pos, ColName)

Parameters

Pos
Column number with zero offset
ColName
String to name inserted column

Return

Returns True on successful and False on failure.

Examples

#insert column (New) before col(1)
import PyOrigin
wks=PyOrigin.WorksheetPages('Book1').Layers(0)
wks.InsertCol(1,'New')