SpreadJS 14
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:
    Autosum function


    Range Considered for Calculation

    In case of numeric values:

    Upper Region

    Upper region

     Left Region

    Left region


    Bottom region

    Bottom region

     Right Region

    Right region


    Autosum function when both the regions contain numbers


     Autosum function in case range includes empty cells


    In case of non-numeric value in cell:


    Autosum function in case of non-numeric value in cell

    Autosum function when the upper region contains non-numeric value

    Autosum function in case of non-numeric value between the range


    Automsum function when non-numeric values exists adjacent to the cell and in between as well


    Special cases

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


     Autosum function when top adjacent cells are empty


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


    Autosum function - special case