GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > FillDate Method : FillDate(CellRange,FillSeries,FillDateUnit,Double,DateTime) Method |
'Declaration Public Overloads Sub FillDate( _ ByVal range As CellRange, _ ByVal series As FillSeries, _ ByVal unit As FillDateUnit, _ ByVal step As System.Double, _ ByVal stop As System.Date _ )
'Usage Dim instance As Worksheet Dim range As CellRange Dim series As FillSeries Dim unit As FillDateUnit Dim step As System.Double Dim stop As System.Date instance.FillDate(range, series, unit, step, stop)
public void FillDate( CellRange range, FillSeries series, FillDateUnit unit, System.double step, System.DateTime stop )
Exception | Description |
---|---|
System.ArgumentNullException | The range cannot be null. |
gcSpreadSheet1.CanUserDragFill = true; gcSpreadSheet1.Sheets[0].SetValue(0, 0, new DateTime(2011, 1, 1)); gcSpreadSheet1.Sheets[0].SetValue(0, 1, new DateTime(2011, 2, 9)); gcSpreadSheet1.Sheets[0].SetValue(0, 2, 5); gcSpreadSheet1.Sheets[0].SetValue(0, 3, 10); gcSpreadSheet1.Sheets[0].SetValue(0, 4, 1); gcSpreadSheet1.Invalidate(); private void button1_Click(object sender, RoutedEventArgs e) { GrapeCity.Windows.SpreadSheet.Data.CellRange r = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 4, 1); gcSpreadSheet1.Sheets[0].FillDate(r, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, GrapeCity.Windows.SpreadSheet.Data.FillDateUnit.Day, 2); GrapeCity.Windows.SpreadSheet.Data.CellRange r2 = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 1, 4, 1); gcSpreadSheet1.Sheets[0].FillDate(r2, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, GrapeCity.Windows.SpreadSheet.Data.FillDateUnit.Day, 1, new DateTime(2011, 2, 11)); GrapeCity.Windows.SpreadSheet.Data.CellRange r3 = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 2, 4, 1); //gcSpreadSheet1.Sheets[0].FillAuto(r3, GrapeCity.Windows.SpreadSheet.Data.FillDirection.Down); gcSpreadSheet1.Sheets[0].FillAuto(r3, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column); GrapeCity.Windows.SpreadSheet.Data.CellRange r4 = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 3, 4, 1); //gcSpreadSheet1.Sheets[0].FillGrowth(r4, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column); //gcSpreadSheet1.Sheets[0].FillGrowth(r4, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, 2); gcSpreadSheet1.Sheets[0].FillGrowth(r4, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, 2, 55); GrapeCity.Windows.SpreadSheet.Data.CellRange r5 = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 4, 4, 1); //gcSpreadSheet1.Sheets[0].FillLinear(r5, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column); //gcSpreadSheet1.Sheets[0].FillLinear(r5, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, 3); gcSpreadSheet1.Sheets[0].FillLinear(r5, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, 3, 20); gcSpreadSheet1.Invalidate(); }
GcSpreadSheet1.CanUserDragFill = True GcSpreadSheet1.Sheets(0).SetValue(0, 0, New DateTime(2011, 1, 1)) GcSpreadSheet1.Sheets(0).SetValue(0, 1, New DateTime(2011, 2, 9)) GcSpreadSheet1.Sheets(0).SetValue(0, 2, 5) GcSpreadSheet1.Sheets(0).SetValue(0, 3, 10) GcSpreadSheet1.Sheets(0).SetValue(0, 4, 1) GcSpreadSheet1.Invalidate() Private Sub Button1_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click Dim r As New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 4, 1) GcSpreadSheet1.Sheets(0).FillDate(r, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, GrapeCity.Windows.SpreadSheet.Data.FillDateUnit.Day, 2) Dim r2 As New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 1, 4, 1) GcSpreadSheet1.Sheets(0).FillDate(r2, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, GrapeCity.Windows.SpreadSheet.Data.FillDateUnit.Day, 1, New DateTime(2011, 2, 11)) Dim r3 As New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 2, 4, 1) 'GcSpreadSheet1.Sheets(0).FillAuto(r3, GrapeCity.Windows.SpreadSheet.Data.FillDirection.Down) GcSpreadSheet1.Sheets(0).FillAuto(r3, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column) Dim r4 As New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 3, 4, 1) 'GcSpreadSheet1.Sheets(0).FillGrowth(r4, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column) 'GcSpreadSheet1.Sheets(0).FillGrowth(r4, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, 2) GcSpreadSheet1.Sheets(0).FillGrowth(r4, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, 2, 55) Dim r5 As New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 4, 4, 1) 'GcSpreadSheet1.Sheets(0).FillLinear(r5, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column) 'GcSpreadSheet1.Sheets(0).FillLinear(r5, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, 3) GcSpreadSheet1.Sheets(0).FillLinear(r5, GrapeCity.Windows.SpreadSheet.Data.FillSeries.Column, 3, 20) GcSpreadSheet1.Invalidate() End Sub
Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)