But I see the TsWorksheetGrid.Workbook.DisableNotifications procedure, with it the operation is faster.Sorry - thiere is no DisableNotification... Where is it?
Sorry - thiere is no DisableNotification... Where is it?
You get best speed if you work with the bare TsWorkbook and TsWorksheet in native mode, not linked to any visual controls.
If I use "ExcelGrid.Workbook.DisableNotifications;" line, the process is much faster, for example (about 800 copy cell):
without it: 1,54 sec
with it: 0,47sec (...)
without Grid, the process time is: 0,132sec
Is it possible to send the notification once in WorksheetGrid.Workbook.EnableNotifications?Looking at the code again (after a while) I see that DisableNotifications/EnableNotifications refer to the OnChanged event which is emitted by the worksheet whenever cell content, cell format etc. changes. This event is distributed by the WorkbookSource among all visual spreadsheet controls which react on this event: the grid for example displays the new cell content or selects the newly focused cell etc. In total this consumes a lot of time, and this is why Disable/EnableNotfications were introduced: between Disable and EnableNotifications the OnChanged events simply are not generated.