Skip to main content
Table of Contents

TTMSFNCDataGridExcelIO.OnExportColumnFormat Event

Occurs during export for each cell, to decide whether it is written as literal text or converted to a number, date or time.

API unit family: TMSFNCDataGridExcelIO Declaring type: TTMSFNCDataGridExcelIO

Syntax

FMX.TMSFNCDataGridExcelIO.hppPascalC++
OnExportColumnFormat: TExportColumnFormatEvent;
__property TExportColumnFormatEvent OnExportColumnFormat = {read=FOnExportColumnFormat, write=FOnExportColumnFormat};

Remarks

Despite its name, the event is raised per cell, not per column; test DataGridCol to apply a column-wide rule. It does not change column widths.

Parameters

Name Description
Sender Grid renderer being exported (not the Excel IO component).
DataGridCol Zero-based grid column of the cell.
DataGridRow Zero-based grid row of the cell.
XlsCol One-based worksheet column the cell is written to.
XlsRow One-based worksheet row the cell is written to.
Value Cell text being exported.
ExportCellAsString Initialized to not Options.ExportCellFormats. Set to True to keep the value as text, for example for codes with leading zeros.