SpreadJS Documentation
FillDateUnit Enumeration
Represents the date fill unit.
Members
MemberDescription
DaySets the date fill unit to day.
MonthSets the date fill unit to month.
WeekdaySets the date fill unit to weekday.
YearSets the date fill unit to year.
Example
This example uses the FillDateUnit enumeration.
spread.canUserDragFill(true);

activeSheet.setValue(0, 0, new Date(2011, 1, 1));
activeSheet.setValue(0, 1, new Date(2011, 2, 9));
activeSheet.setValue(0, 2, 5);
activeSheet.setValue(0, 3, 10);
activeSheet.setValue(0, 4, 1);

var start = new GcSpread.Sheets.Range(0, 0, 1, 1);
var r = new GcSpread.Sheets.Range(0, 0, 4, 1);
activeSheet.fillDate(start,r, GcSpread.Sheets.FillSeries.Column,GcSpread.Sheets.FillDateUnit.Day, 2);
start = new GcSpread.Sheets.Range(0, 1, 1, 1);
var r2 = new GcSpread.Sheets.Range(0, 1, 4, 1);
activeSheet.fillDate(start,r2, GcSpread.Sheets.FillSeries.Column, GcSpread.Sheets.FillDateUnit.Day, 1, new Date(2011, 2, 11));
start = new GcSpread.Sheets.Range(0, 2, 1, 1);
var r3 = new GcSpread.Sheets.Range(0, 2, 4, 1);
activeSheet.fillAuto(start,r3, GcSpread.Sheets.FillSeries.Column);
start = new GcSpread.Sheets.Range(0, 3, 1, 1);
var r4 = new GcSpread.Sheets.Range(0, 3, 4, 1);
activeSheet.fillGrowth(start,r4, GcSpread.Sheets.FillSeries.Column, 2, 55);
start = new GcSpread.Sheets.Range(0, 4, 1, 1);
var r5 = new GcSpread.Sheets.Range(0, 4, 4, 1);
activeSheet.fillLinear(start,r5, GcSpread.Sheets.FillSeries.Column, 3, 20);
activeSheet.setValue(0,5,123);
var r6 = new GcSpread.Sheets.Range(0, 5, 4, 1);
activeSheet.fillAuto(new GcSpread.Sheets.Range(0, 5, 1, 1), r6, GcSpread.Sheets.FillSeries.Column);
Inheritance Hierarchy

Object
   GcSpread.Sheets.FillDateUnit

See Also

Reference

GcSpread.Sheets Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.