clear all the data in the datasheet
VB: Function ClearData([ c1 As ByVal Object ], [ c2 As ByVal Object ] ) As Boolean
C++: bool ClearData(_variant_t c1, _variant_t c2 )
C#: bool ClearData(var c1, var c2 )
Sub cleardata() Dim ds As Origin.Datasheet Dim app As Origin.IOApplication app = New Origin.ApplicationSI ds = app.ActivePage.Layers(-1) 'get active layer of active page ds.ClearData(0, -1) ' clear all the data in datasheet End Sub
public void ClearData() { Origin.IOApplication pOrigin; Origin.Datasheet dsht; pOrigin = new Origin.ApplicationSIClass(); pOrigin.Visible = Origin.MAINWND_VISIBLE.MAINWND_SHOW; dsht = (Datasheet)pOrigin.ActivePage.Layers[-1]; //get active matrixsheet of worksheet, do make sure active page is MatrixBook or WorkBook dsht.ClearData(0, -1); //clear all data on datasheet } static void Main(string[] args) { Program p = new Program(); p.ClearData(); }
8.0SR2