The Cols property is an integer value that holds the number of columns in the worksheet.
VB: Property Get/Let Cols As Integer
C++: int Cols
C#: int Cols
Private Sub AddColumnsToWorksheet(sheetName As String, numCols As Integer) Dim app As Origin.ApplicationSI Set app = New Origin.ApplicationSI Dim wks As Origin.Worksheet Set wks = app.FindWorksheet(sheetName) If wks Is Nothing Then MsgBox ("Failed to find worksheet") Exit Sub End If wks.Cols = wks.Cols + numCols End Sub
using Origin; // allow using Column, Worksheet, etc. without having to write Origin.Column static void AddColumnsToWorksheet(string strSheetName, int nCols) { ApplicationSI app = new Origin.ApplicationSI(); Worksheet wks = app.FindWorksheet(strSheetName); if (wks == null) { Console.WriteLine("Failed to find worksheet"); return; } wks.Cols += nCols; }
8.0SR2
OriginCOM:Worksheet-Rows