Posted 14 September 2026, 10:06 pm EST
Hi Priyam,
Thank you for clarifying the current design specification.
I wanted to share with you my intended behavior and the reason for my question:
- I use DataRange to display simulation results on the worksheet in real time.
- Users want to highlight certain parts of the simulation output, so they change cell styles (font, foreground color, background color) using a toolbar.
- The simulation results themselves do not need to be persisted, but the user‑defined cell styles should be saved together with the worksheet.
Therefore, I would like style changes made on cells inside a DataRange to be reflected in the worksheet model, so they can be persisted.
In the future, it would be ideal if the IDataProvider interface were extended so that, similar to:
setValue(row: number, col: number, value: unknown, changes: any[]): boolean
a corresponding method such as:
setStyle(row: number, col: number, style: GC.Spread.Sheets.Style, changes: any[]): boolean
could also be supported.
Until such functionality becomes available, I am considering the following temporary workaround:
- Capture the user’s cell‑style change operation.
- Find any DataRange that overlaps with the target cell range and temporarily remove it from the worksheet.
- Apply the actual style change to the worksheet so that it is stored in the sheet model.
- Re‑add the removed DataRange back to the worksheet.
- Suspend worksheet painting during steps 2–4 to avoid flickering.
Would this approach work as expected?