SpreadJS v16.2 (Service Pack 2) has just been released, and we have some awesome new features to share! We have added the following features in this release:
Ready to See All the New Features? Download SpreadJS Today!
With the SpreadJS 16.2 release, we have added a Beta version of a new Add-On known as GanttSheet. This is a full Gantt implementation inside of a specialized sheet in SpreadJS. It has its own headers and uses shapes to draw the Gantt tasks. There are multiple options that Gantt Sheet offers, including:
The GanttSheet is built on a fast data-bound DataTable view with Gantt behavior and a spreadsheet user interface. It can be bound to a DataManager view with a specific schema.
The release of this optional add-on is in Beta, so that it won’t be fully supported until the v17 release.
Viewing, editing, and debugging long and complex formulas in SpreadJS is now even easier with the Formula Editor Panel. This new component provides the following functionality:
Formula text will be displayed in different colors according to the type of token:
Formulas that are long and complex can be formatted into separate lines with the appropriate indentation and nesting:
Formula outlines can be collapsed and expanded:
Formulas can be entered quickly and correctly with suggested functions, custom names, and enumerated parameters:
Tooltips with information about a function will show when a user hovers over a function name or types a function:
Formula errors such as incorrect parameters and unmatched brackets will be flagged:
You can change the appearance of the Formula Editor by changing the theme CSS, which include properties such as tokens, tooltips, backgrounds, foregrounds, and referenced ranges.
Different syntax elements of a formula (such as the referenced ranges) are highlighted accordingly to enhance readability.
In our goal to add more accessibility options to SpreadJS, we have added the Cell.altText property in this release. This property lets you set specific text that will be read by a screen reader when accessibility is set to true:
sheet.getCell(1, 1).value(1000).altText("Sales amount is {value}");
Accessibility With Custom Alternative Text | Features | SpreadJS JavaScript Demos
The SUMIFS and XLOOKUP functions have been enhanced in terms of performance, so workbooks that use these functions should be faster in certain circumstances.
SpreadJS now supports manual calculation. When set, formulas will not automatically calculate; instead, formulas will only calculate when edited or when a new formula is entered. This is supported through a new CalculationMode enumeration which is auto by default and can be set to manual.
With automatic calculation, all dirty cells (cells that have been changed) will be calculated if relevant cells (cells that are referenced in those dirty cells) have been changed. With manual calculation, the only cells calculated are the ones that have been directly changed; cells that reference that changed cell will not be calculated.
In SpreadJS, a user can enter formulas in a cell by typing “=”. Typically, a user would only be able to select cells with the cursor to reference in that formula as long as they were on the same sheet. With this release, we have added the ability to click on a different sheet tab while editing a cell formula to reference cells in other worksheets. This functionality can be enabled or disabled depending on your preference by changing the CSS.
We have added a property that allows you to set the default value for a cell. Normally, a cell will display blank when there is no value in it. With this release, you can set any value or formula as the default value of a cell. You can get and set the default value with a simple property:
activeSheet.getCell(0, 0).defaultValue(20);
console.log("DefaultValue of cell(0,0) using defaulValue method: " + activeSheet.getCell(0, 0).defaultValue());
Date Time Pickers and Sliders have been enhanced to support users defining a time period or range that includes either:
This enhancement represents a simple object that can be stored as a cell value, with start and end properties that can either be Dates or Integers.
Date Time Picker | Features | SpreadJS JavaScript Demos
Slider | Features | SpreadJS JavaScript Demos
Copying styles in SpreadJS has been enhanced to match Excel. Now, SpreadJS will generate named styles for cells and add them on top of the HTML clipboard content instead of adding the same style definition for each cell, which reduces the command size.
The WINDOW functions added in this release provide data analysis in a TableSheet. These functions can perform aggregation, ranking, and analytical calculations over a particular window (a set of table rows that are related to the current row) and produce a result for each row. This allows you to work with both aggregate and non-aggregate values simultaneously. These new functions are as follows:
The best example of an implementation of Windows functions is a running total. You can use Windows functions to create a running total of some data and use things like the PARTITIONBY function to get running totals for each year or something similar:
TableSheet Window Functions Demo
The first enhancement we made to the Designer Component in this release was the ability to set a default active tab in the ribbon. By setting a default active tab in the configuration, that specific tab will be open upon loading the SpreadJS Designer Component.
// Use the activeRibbonTab method of the designer component to set the active ribbon tab.
var config = GC.Spread.Sheets.Designer.DefaultConfig;
var designer = new GC.Spread.Sheets.Designer.Designer(document.getElementById("designerHost"), config);
let currentActiveRibbonTab = designer.activeRibbonTab();
if (currentActiveRibbonTab !== "insert")
{
designer.activeRibbonTab("insert");
}
We have added Themes, Colors, and Fonts buttons to the Designer, which lets users switch themes or color sets to affect all shapes, charts, and built-in cell styles that reference those theme colors.
SpreadJS supports opening and saving Excel files with passwords, and we have now added that functionality to the SpreadJS Designer in the File Dialog.
Names can now be set to read-only in the name manager with this release. This can prevent your users from changing specific names in the workbook.
SpreadJS now supports Angular 16 for our Angular wrapper and the Designer Component.
These are many of the features that we are adding to SpreadJS with the v16.2 release.
Be sure to download a trial of SpreadJS today and view the demos to check out all of these new features!