SpreadJS 16

Released: Dec 21, 2022

16 での更新項目

機能

New File Format

  • Added a new, improved .sjs file format to improve the performance of importing large Microsoft Excel files while also creating a smaller, better-optimized file when saving.
    • Bypasses the previous need to first export to SSJSON.
    • Translates the data directly to the model.
    • The resulting data is saved to a zipped .sjs file with smaller SSJSON files, making it similar to Excel’s own XML structure.
    • Makes the ExcelIO process much faster and smaller.

TableSheet Enhancements

  • Hierarchy in Data Manager:
    • TableSheets now support hierarchy data in the source data. This includes four different types of data for records with:
      • Properties “id” and “parentId”.
      • Properties that indicate hierarchy level.
      • Properties that include hierarchical children.
      • A primary key that can be parsed to a hierarchy using a custom function.
    • Hierarchy operations have been added as well, giving users the ability to:
      • Promote/Demote records.
      • Move records up/down.
      • Insert records after/before or above/below.
      • Delete a record.
      • Expand/Collapse all record levels or specific levels.
      • Sort/filter records.
  • Data Manager Field Name Mapping
    • The data source schema for the Data Manager now supports setting an alias for columns.
    • Allows for different names between the front-end and back-end of a data source.
    • This can be done by simply setting the “Caption” property when adding a view to the Data Manager.

Designer Enhancements

  • TableSheet Template and Panel Enhancements
    • Specific columns can now be collapsed when working with relationship data in the column list.
    • Relationship columns can also be clicked on to show the details for that specific column.
    • This functionality also works for the TableSheet Panel on the right side of the Designer when selecting a TableSheet in the workbook.
    • Additional features include grouping and dragging fields around.
  • TableSheet Hierarchy Data
    • Added support for hierarchical data in the Columns tab of the Data Source.
    • Columns now have a separate “Hierarchy” section with things like Type, Summary Formula, and Outline Column that can be defined. These options can be used as follows:
      • Type - Defined as either Parent, ChildrenPath, or Level.
      • Summary Formula - Input the hierarchy summary formula for a specified column.
      • Outline Column - Customize the display of the column, specifying whether or not to include checkboxes, images, or indicators.
  • Selection-Level Find/Replace
    • Enhances the Find and Replace functionality to search only in a specific selection of cells.
  • Format Pane
    • Added a new Format Pane button which lets users easily open up the existing side panels for Shapes, Pictures, and Charts.

Calculation Enhancement

  • Invalid Formula Input Behavior and Styles:
    • SpreadJS automatically recognizes invalid formulas and shows an error when a user tries to submit one. However, the formula would also be removed if it was invalid, and with this release, this behavior has been enhanced to keep the formula in the cell but instead convert it to text if the AllowInvalidFormula option is set to true.
    • Added a cell state specifically for invalid formulas. This means that you can mark cells that have invalid formulas and apply styles to those specific cells.

Shape Enhancements

  • Microsoft Excel-Like Form Controls - To make it even easier to create your own forms within SpreadJS, some useful Excel-Like form controls based on SpreadJS shapes have been added.
    • These controls include:
      • Buttons.
      • Spin Buttons.
      • List Boxes.
      • Combo Boxes.
      • Check Boxes.
      • Option Buttons.
      • Group Boxes.
      • Labels.
      • Scrollbars.
    • Added a new event called FormControlValueChanged which fires whenever a form control's value changes (UI operation, API call, or associated cell changes).
  • Resizing Enhancement
    • Developers can now restrict or allow different types of shape resizing.
    • These types include aspect, horizontal, and vertical resizing and can be set using the API “allowResize”.
  • Shift+Mouse Resize Behavior
    • When allowResize is set to true in a sheet, the shift key can now be held down while resizing a shape with the mouse to retain the shape’s aspect ratio.

Workbook Enhancements

  • Copy/Cut Cancel Event
    • The events for copying and cutting have been enhanced to provide the current state of the clipboard. This can help with implementing specific functionality during certain stages of the copy/cut/paste process with additional arguments added to the following events:
      • ClipboardChanging.
      • ClipboardPasting.
      • ClipboardPasted.
  • Cell Decoration Style
    • The style implementation has been enhanced to include cell decoration. This includes:
      • Ellipse Color.
      • Corner Fold Color.
      • Icon (Position, Icon, and Color).
  • Custom Styles for Data Validation
    • Data validation is useful to mark data as incorrect or prevent the entering of specific data. Styles could be set for that validation, but for this release, the ability to set custom styles for the data validation has been added.
  • Cancel Input in EditEnding and EditEnded Events
    • The EditEnding and EditEnded events occur after a user has entered or changed data in a cell. With this release, a cancel parameter has been added so the developer can cancel the edit if needed.