Fills a range with values inferred from a source range. This method employs some heuristics similar to what Excel's auto-filling algorithm does when you select a range of cells and drag the bottom-right handle. The range to be filled is the current object, and you must pass a source range containing data as first argument.


srcRange Range | String

The source range. It must have the same number of rows or the same number of columns as the current range — otherwise an exception will be thrown (a Range.FillError object having code property "incompatibleRanges").

direction Number optional

Specifies the fill direction. If the source range (srcRange) and target range (the current object) are adjacent, the fill direction can be inferred from their positions, so it can be missing. For example:


In this case it will select vertical reverse filling, because the target range is above the source range.

If the ranges are not adjacent and the direction is missing, an exception will be thrown if the ranges don't start either on same column or on the same row ("noFillDirection" error code).

Possible values for direction:

  • 0 — fill top-down
  • 1 — fill left-to-right
  • 2 — fill bottom-up
  • 3 — fill right-to-left


    <div id="spreadsheet"></div>


        var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");

        var sheet = spreadsheet.activeSheet();

            [ 2, "Mon", "Foo 1" ],
            [ 5, "Wed", "Foo 2" ]

        try {
        } catch(ex) {
            if (ex instanceof kendo.spreadsheet.Range.FillError) {
                // can be "incompatibleRanges" or "noFillDirection"
    /* The result can be observed in the DevTools(F12) console of the browser. */
            } else {
                throw ex;

The above will continue column A with 8, 11, 14 etc., column B with "Fri", "Sun", "Thu" etc. and column C with "Foo 3", "Foo 4" etc.

In this article