SpreadJS Documentation
fillAuto Method
The fill start range.
The entire range to fill.
The fill series.
Fills the specified range automatically. When the value is a string, the value is copied to other cells. When the value is a number, the new value is generated by the TREND formula.
Syntax
var instance = new GcSpread.Sheets.Sheet(name);
var value; // Type: any
value = instance.fillAuto(startRange, wholeRange, series);
function fillAuto( 
   startRange : Range,
   wholeRange : Range,
   series : FillSeries
) : any;

Parameters

startRange
The fill start range.
wholeRange
The entire range to fill.
series
The fill series.
Example
This example automatically fills the data in an area of the sheet.
activeSheet.setValue(0, 0, 5);
var start = new GcSpread.Sheets.Range(0, 0, 1, 1);
var r3 = new GcSpread.Sheets.Range(0, 0, 4, 1);
activeSheet.fillAuto(start,r3, GcSpread.Sheets.FillSeries.Column, GcSpread.Sheets.FillDirection.down);
This example automatically fills ranges.
sheet.setValue(0, 0, new Date(2011, 1, 1));
sheet.setValue(0, 1, new Date(2011, 2, 9));
sheet.setValue(0, 2, 5);
sheet.setValue(0, 3, 10);
sheet.setValue(0, 4, 1);
var start = new GcSpread.Sheets.Range(0, 0, 1, 1);
var r = new GcSpread.Sheets.Range(0, 0, 4, 1);
sheet.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);
sheet.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);
sheet.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);
sheet.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);
sheet.fillLinear(start,r5, GcSpread.Sheets.FillSeries.Column, 3, 20);
See Also

Reference

Sheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.