Add a block of data to datarange
VB: Function Add(Type As ByVal String, wks As Worksheet, r1 As ByVal Integer, c1 As ByVal Integer, r2 As ByVal Integer, c2 As ByVal Integer ) As Integer
C++: int Add(LPCSTR Type, Worksheet wks, int r1, int c1, int r2, int c2 )
C#: int Add(string Type, Worksheet wks, int r1, int c1, int r2, int c2 )
Sub Add() Dim app As Origin.IOApplication Dim dr As Origin.DataRange Dim wks As Origin.Worksheet app = New Origin.ApplicationSI wks = app.FindWorksheet("") ' get the active wks If wks Is Nothing Then MsgBox("Can not get an active worksheet") Exit Sub End If dr = wks.NewDataRange() dr.Add("X", wks, 0, 0, -1, 0) 'add first column of wks as X dr.Add("Y", wks, 0, 1, -1, 1) 'add sceond column as Y End Sub
8.0SR2