8.1.26.19 Worksheet::SetData

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 Data for worksheet

Syntax

SetData(Var,  Row,  Col)

Parameters

Var
a pointer points toA two-dimensional array containing the data that will be put into the worksheet.
Row
Zero based index of the first row, in the worksheet, to receive the data. Default is zero. Use -1 to append the data.
Col
Zero based index of the first column, in the worksheet, to receive the data. Default is zero. Use -1 to append the data.

Return

Returns True on successful and False on failure.

Examples

#Create Book1
import PyOrigin
PyOrigin.LT_execute('newbook name:=Book1')
Sheet=PyOrigin.WorksheetPages('Book1').Layers(0)
pArr = [[x for x in range(5)] for x in range(2)] 
Sheet.SetData(pArr, 0,0)