8.1.15.1 MatrixObject::GetData
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 two dimensional data from a specified MatrixObject
Syntax
VARIANT* GetData(MR1 = 0, MC1 = 0, MR2 = -1, MC2 = -1)
Parameters
- MR1
- Starting (zero based) row index to get data from. This is optional argument, defaults to 0.
- MC1
- Starting (zero based) column index to get data from. This is optional argument, defaults to 0.
- MR2
- Ending (zero based) row index to get data from. This is optional argument, defaults to -1 (to the rest of worksheet).
- MC2
- Ending (zero based) column index to get data from. This is optional argument, defaults to -1 (to the rest of worksheet).
Return
Examples
EX1
import PyOrigin pArr2D = [[x for x in range(5)] for x in range(5)] MatrixPage=PyOrigin.MatrixPages('MBook1') MatrixPage.Layers('MSheet1').SetColCount(5) MatrixPage.Layers('MSheet1').SetRowCount(5) MO=MatrixPage.Layers('MSheet1').MatrixObjects(0) MO.SetData(pArr2D, 0, 0) Mdata=MO.GetData() print(Mdata)