在目前列中由 ColumnIndex 指定的欄儲存至儲存格後觸發
描述
您可以使用此事件對詳細區域中任何已匯出的儲存格套用條件式格式設定
語法
TDBGridAfterCell =
procedure (Sender: TObject; Cell:
IXLSRange; RowIndex, ColumnIndex: Integer; Column: TColumn) of object;
| Sender |
TObject. 指定 TGridToXLS 元件 triggered 事件 |
| Cell |
IXLSRange,代表正在匯出的儲存格 |
| RowIndex |
Integer,目前列的索引 |
| ColumnIndex |
整數. 索引 的 欄 |
| Column |
TColumn. 物件 表示 欄 |
範例
procedure TForm1.GridToXLS1AfterCell(Sender: TObject;
Cell: IXLSRange; RowIndex, ColumnIndex: Integer; Column: TColumn);
begin
if Odd(ColumnIndex + 1) then Cell.Interior.Color := ColorToRGB(clSilver);
end;