Class: TEgDBGridEx
property OnExportProgress: TEgDBGridExportProgressEvent;
Fired while ExportToXLSX
runs, reporting progress as a percentage (0-100) so a caller can drive a
progress bar or similar UI feedback. Always fires once with
PercentDone = 0 before any work starts. Fires again, at
most once per whole-percent change, as the underlying dataset is
traversed - based on the dataset’s own RecordCount, so no
intermediate call happens if RecordCount is not available
(never floods the handler with one call per row either way). Fires a
final time with PercentDone = 100 once the
.xlsx file has been completely written - this last call is
skipped if the export raises an exception at any point.
When SelectedRowsOnly is True (see ExportToXLSX),
the percentage still reflects how far the grid has traversed its
underlying dataset as a whole, not how many rows have actually been
written to the .xlsx file - scanning past non-selected
records is usually the dominant cost when only a few rows are selected
out of a much larger dataset, so this keeps the percentage moving
smoothly instead of stalling near 0% while non-selected records are
skipped.
PercentDone is a var parameter only to
match TEgDBGridExportProgressEvent’s
own shape; nothing a handler assigns back into it is read by
ExportToXLSX. See TEgDBGridExportProgressEvent.