SpreadJS Documentation
SpreadJS Documentation / SpreadJS Designer / Work in the Designer / AutoSum Functions
In This Topic
    AutoSum Functions
    In This Topic

    While using AutoSum functions in SpreadJS, such as sum, average, min, max etc, the range of cells on which the function should be applied is automatically calculated. When a cell is selected in a spreadsheet and a function is applied on it, the range is automatically highlighted. The calculation of range is based on the active cell and the calculated result is also displayed in the active cell.

    Note: The automatic calculation of range is done only for the 'number' type fields.

    The below gif depicts the automatic calculation of range when sum function is applied:

     

    Range Considered for Calculation

    In case of numeric values:

    Upper Region

     Left Region

     

    Bottom region

     Right Region

     

     

     

     

    In case of non-numeric value in cell:

     

     

     

    Special cases

    If the top adjacent cells are empty, while the left adjacent cells are numbers, the left region is considered.

     

     

     

    The boundary of the range under consideration automatically expands to the width of a span.