SpreadJS 19.1.0
Released: May 12, 2026
19.1.0 中的更新
特性
Designer Enhancements
- Templates Configuration & Default Template - The Designer now includes a templatesConfig option, allowing users to define and apply pre-configured styles and formats to new workbooks. By providing a URL to a template configuration file, users can load various template types from remote sources or pre-loaded data, ensuring consistent workbook creation. This feature simplifies workflow by applying default or selected templates upon initialization or 'Reset' operations, with asynchronous loading preventing immediate overwrites.
- Search Added to Formula Dialog - The Search feature in the Insert Function dialog lets users quickly find the right spreadsheet function by typing keywords and instantly filtering results. It surfaces the best matches in a Recommended list (based on names, descriptions, categories, and arguments), supports keyboard navigation, and makes inserting functions faster and easier.
- SpreadJS XLSX Editor for VSCode Plugin - The new SpreadJS Designer VS Code plugin brings full spreadsheet design capabilities directly into your editor, letting you open, edit, and save .sjs, .ssjson, Excel (.xlsx/.xlsm/.xltm/.xltx), and .csv files without leaving VS Code. It adds an 'Open with SpreadJS' context-menu action, handles password‑protected Excel files with inline prompts, and integrates with VS Code's save flow and command palette for creating new files. The plugin is tailored for the VS Code environment with a customized file menu, support for classic/toolbar ribbon modes, automatic light/dark theme adaptation, and localization via language and culture settings.
Formulas
- Custom Functions in Calc Worker - SpreadJS now lets your custom functions run directly inside the Calc Worker, so they're evaluated off the UI thread for faster, smoother spreadsheets - especially with heavy or async logic. By adding a simple supportCalcWorker() flag to your custom Function or AsyncFunction, SpreadJS serializes the function and executes it in the worker. In benchmarks, Calc Worker improved performance up to 3 times faster.
- Value and Array to Text Functions - SpreadJS introduces two new functions, VALUETOTEXT and ARRAYTOTEXT, designed to enhance text conversion within your spreadsheets. VALUETOTEXT converts any single value into text, while ARRAYTOTEXT performs the same conversion for an array of values, making it easier to manipulate and display data consistently.
Conditional Formatting
- Top/Bottom Percent Rule - This feature enhances SpreadJS with native percent-based Top/Bottom conditional formatting, aligning its behavior with Excel. It calculates "hits" based on the number of non-empty numeric cells (N) in a range, using max(1, floor(N x P)) when N > 0 to ensure at least one match, and 0 when N = 0. This change improves data scale stability and Excel import compatibility, and can be enabled via the isPercent property in NormalConditionRule or conditionalFormats.addTop10Rule.
- Sparkline Rules in Conditional Formatting - SpreadJS now lets you drive Sparklines entirely through conditional formatting rules, turning cell values and ranges into mini‑charts without writing formulas. New built‑in placeholders like $CF_RANGE$ and @ make it easy to target the rule's range and current cell, so you can quickly build visual KPIs such as pie, gauge, lollipop variance, bullet, and even custom sparklines across Worksheets.
Cell Formatting
- Single and Double Accounting Underline - SpreadJS now adds Single Accounting and Double Accounting underline styles, closing a key gap with Excel and improving financial-report formatting and Excel import/export fidelity. These underlines render using Excel-aligned rules (baseline-based positioning, adaptive spacing by font size, and smart width behavior for numbers vs. text), with graceful fallback when cell height is too small.
- Picture In Cell - SpreadJS now supports inserting Excel-style pictures directly into cells as 'image rich data' so images behave like real cell values that can be sorted, filtered, searched, used in lookups, and even included in certain formulas and pivots. Designers can easily switch between 'picture in cell' and floating images, control sizing and alignment, and rely on shared internal storage for repeated images to keep workbooks efficient and compatible with Excel behavior.
- Named Cell Templates - SpreadJS introduces Named Cell Templates, letting you package styles, conditional formatting, data validation, and cell states into reusable templates that can be applied to any worksheet, TableSheet, GanttSheet, or ReportSheet range with a single call. These templates are workbook‑level, apply‑only (no live binding), and dramatically cut repetitive setup while keeping your cell configurations consistent.
What-If Analysis
- Support What-If Analysis Data Table - SpreadJS now supports Excel-style What-If Analysis data tables through a new SJS.TABLE function, which simulates different input scenarios and returns the corresponding calculation results as dynamic arrays. This design removes many of Excel's structural limitations (like rigid data table layouts), while still importing Excel data tables as SJS.TABLE formulas and attempting to export them back when possible. To keep large models responsive, a new partial calculation mode and enhanced CalculationProgress event let you control and monitor the performance impact of these simulations.
- Support What-If Analysis Goal Seek - The goalSeek method automatically adjusts the value of a specified cell so that a formula in another cell reaches a desired result. This method now accepts an optional options object to control maximumIterations, tolerance, and a per-iteration callback (sync or async) for monitoring progress or stopping early.
Import/Export
- Support XLTX File Formats - SpreadJS now fully supports the Excel XLTX template file format, allowing users to import .xltx templates as normal workbooks in the browser and export workbooks back to .xltx while preserving template behavior in Excel. This includes new public APIs and Designer support for opening and saving XLTX files for seamless template-based workflows.
- Export SparklineEx Types as Images in Excel - SpreadJS can now export barcode, sparkline, and custom SparklineEx formulas as images to Excel when saveAsView is enabled, so the rendered visuals remain intact even though Excel doesn't natively support these formulas. The original formulas are still preserved alongside the images.
Data Manager
- DataSource Panel Enhancements - SpreadJS Designer's revamped Data Source panel uses collapsible sections, clearer column tools, and a new Local Data Setup dialog to quickly bind in‑memory JSON/column JSON/CSV/XML data. A new Data tab also provides a read-only TableSheet-style preview so users can verify styles, calculated columns, and schema without leaving the designer. The Designer also allows users to customize request headers for remote APIs through a new UI, enabling configuration of authentication tokens and other header values with options for adding, deleting, and updating headers, including a convenient list of commonly used headers.
TableSheet
- Support Multi-column Sorting -TableSheet now supports multi-column sorting, letting users combine and sequence sorts across multiple fields with clear visual indicators and intuitive [+]/[-] controls in the filter menu. Developers can enable or disable this behavior per sheet, while grouped, hierarchical, and cross columns respect the defined sort order for more precise, Excel-like data views.
PivotTable
- Automatically Add Excel-like Date Groups - PivotTables can now automatically group date fields into Excel-like date hierarchies (Years, Quarters, Months, etc.) when added through the Panel.
- Added Field Search in Pivot Panel - SpreadJS now adds an Excel-like search box to the Pivot Panel's field list, making it easy to instantly filter and find pivot source fields. This enhancement streamlines working with large pivot datasets so users can locate and configure fields much faster.
Collaboration Server
- Support Table Sheet and Data Manager - SpreadJS now adds full collaboration support for Table Sheet and the underlying Data Manager, synchronizing all configuration-level operations (sheets, views, relationships, sort/filter/group, etc.) across users while intentionally excluding externally managed datasets so you get real-time, high‑performance coauthoring without compromising external data control. This 'configuration collaboration' model ensures consistent document snapshots and undo/redo behavior in multi-user scenarios, even with complex Table Sheet and Data Manager structures.
- Support Local Data in Data Manager - TableSheet now supports full collaboration on local data managed by Data Manager, synchronizing edits to records, columns, hierarchies, pinned rows, and schema changes across users while efficiently storing large datasets as fragments. JSON and columnJSON formats are fully collaborative, giving teams real-time, Excel-like coauthoring even when working with complex tree layouts and large local datasets.
DataCharts
- Support Hierarchical Category in DataCharts - DataChart now supports hierarchical categories on Cartesian charts, so you can visualize multi-level dimensions like Year Quarter Month or Region Country City on a single axis with predictable grouping and aggregation. The new nested category encoding API preserves backward compatibility while enabling rich drill-style analysis across supported column, bar, area, line, candlestick, and OHLC chart types.
GanttSheet
- Improved UX for Building GanttSheet - SpreadJS Designer now includes an enhanced GanttSheet panel that centralizes field mapping, hierarchy configuration, and default task mode into a single, drag‑and‑drop experience - complete with auto-mapping and intelligent inference based on your data schema. This makes it far easier to bind data sources and use GanttSheet for both scheduling and general timeline/date‑range visualizations without hunting through multiple dialogs.
- Table Theme Support in GanttSheet - GanttSheet now fully honors SpreadJS TableTheme styling across its table, time scale, and chart regions, so fonts, colors, backgrounds, alternating rows, and gridlines stay visually consistent with your TableSheet designs.
UI and UX Enhancements
- Automatic Scrollbar Visibility - New "auto" scrollbar option, which intelligently hides scrollbars when content isn't scrollable, creating a cleaner user interface.
- Excel-Like Checkboxes - Now offers a modern Excel-style UI with configurable hit-testing and text editing, plus full Excel import/export support.
- Disable Mentions in Threaded Comments - Lets you disable @mentions in threaded comments via configuration, so you can keep the comments experience while hiding the mention panel.
- Adding Shapes via Drag-and-drop - Drawing Mode for adding shapes with a precision crosshair cursor and real-time, translucent outlines, supporting snapping and connector routing.
- Curved Connector Shapes - SpreadJS now supports curved connector shapes in addition to straight and elbow.
Framework Support
- Angular 21 Support - SpreadJS is now fully tested and confirmed compatible with Angular 21, with the Angular demos updated to Angular v21.2.0 so developers can confidently upgrade their Angular apps without changing any SpreadJS integration code.
- NextJS 16 Support - SpreadJS is now fully compatible with Next.js 16, with a simple React integration pattern using client components, next/dynamic (SSR disabled), and updated guidance for Turbopack and addon imports so spreadsheet apps run smoothly in the latest Next.js stack.