SfSpreadsheet Performance when setting Styles

1) Sir, I am setting the styles for ~ 500 different cells across the workbook. But the performance is terrible. It takes nearly 45 seconds to load the Sfspreadsheet into the view, and then takes ~ 10 seonds to change tabs the first time. Subsequent times on changing tabs are faster.

Is there anything I can do?

I understand it is better to apply a style to a range of cells, rather than the same style one by one to each cell in a range. I only have about 5 different styles in total, but these are applied across many cells depending on the state of the cell

What I am trying to achieve is a shade of red when the cell is invalid, grey when not in use, green when empty and clear when data is valid. I am only setting font background and foreground colours in the styles. I have removed all settings of fonts and font sizes etc to try and speed it up. I also only refresh the cell when that cell is the active sheet

2) Is it faster to refresh say 10 cells, or just refresh the whole sheet? Is there some guidance on this? If i change 50 cells should they be refreshed one by one, or just the sheet? (Yes I refresh cells as a range of cells where those cells are adjacent)

James

1 Reply

TL Thirumurugan Loganathan Syncfusion Team February 27, 2018 12:01 PM UTC

Hi James, 
 
We have checked the performance issue by loading sample excel sheet with cell styles in Spreadsheet and analyzed the performance metrics. It took 12 seconds for loading into spreadsheet and around 1 or 2 seconds for tab switching.  The performance will vary based on the formulas, cell styles and formatting used in the excel sheet,  hence could you please share your excel file which will be helpful for us to validate and update you with appropriate solution. 
 
Regards, 
Thirumurugan 


Loader.
Up arrow icon