- SpreadJS Overview
- Getting Started
- JavaScript Frameworks
- Best Practices
- Features
- SpreadJS Designer
-
SpreadJS Designer Component
- Getting Started
- Quick Start
- Theme
- Designer Interface
- JavaScript Frameworks
- Customizations
-
Work in Designer Component
- AutoSum Functions
- Set Range Template Cell
- Name Box
- Select Cells Using Go To
- Find and Replace
- Edit Font Size
- Edit Font Family
- Manage Conditional Formatting Rules
- Shape Selection Pane
- Automatic Outline
- Format Painter
- Table Slicer
- TableSheet
- GanttSheet Designer
- ReportSheet Designer
- Data Chart Designer
- Text to Columns
- Remove Duplicates
- Pivot Table
- Dockable Side Panel
- Command Palette
- Transform Cells with LAMBDA Formula
- Toolbar Ribbon
- API Documentation
- SpreadJS Collaboration Server
- Touch Support
- Formula Reference
- Import and Export Reference
- Frequently Used Events
- API Documentation
- Release Notes
AutoSum Functions
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 to 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 the sum function is applied:
aotuSum1
Range Considered for Calculation
In case of numeric values:
The upper and left region of the active cell containing numbers are considered.
Upper Region
autoSum2
Left Region
autoSum3
The bottom and right region of the active cell containing numbers are not considered.
Bottom region
autoSum4
Right Region
autoSum5
If both the upper and left region of the active cell contains numbers, the range of upper region is considered.
autoSum6
If there are numbers above the cell but not adjacent to the cell, the range includes empty cells until numbers are encountered and no empty cells afterwards (same for left region)
autoSum7
In case of non-numeric value in cell:
Complete range is considered if a non-numeric value exists adjacent to the active cell (same for left region).
autoSum8
If left and upper region both contain left and right contain data, and the upper region contains non-numeric value adjacent to the cell on which function is applied, the range of left region is considered.
autoSum9
If the non-numeric value exists in between, the range is considered till it is encountered.
image
If non-numeric values exists adjacent to the cell and in between too, the range is considered until the cell containing numbers is encountered and does not consider any non-numeric values afterwards.
autoSum11
Special cases
If the top adjacent cells are empty, while the left adjacent cells are numbers, the left region is considered.
autoSum12
The boundary of the range under consideration automatically expands to the width of a span.
autoSum13