Mô tả
Bạn có thể dùng sự kiện này để áp dụng định dạng bổ sung cho toàn bộ vùng xuất
Cú pháp
TAfterExport =
procedure (Sender: TObject; Range:
IXLSRange) of object;
| Sender |
TObject. Chỉ định thành phần TDataToXLS đã kích hoạt sự kiện |
| Range |
IXLSRange. Đại diện cho vùng chứa toàn bộ khu vực đã xuất |
Ví dụ
Ví dụ này đặt viền dày xung quanh vùng xuất
procedure TForm1.DataToXLS1AfterExport(Sender: TObject;
Range: IXLSRange);
begin
With Range.Borders do begin
Item[xlEdgeBottom].LineStyle := xlContinuous;
Item[xlEdgeBottom].Weight := xlThick;
Item[xlEdgeTop].LineStyle := xlContinuous;
Item[xlEdgeTop].Weight := xlThick;
Item[xlEdgeLeft].LineStyle := xlContinuous;
Item[xlEdgeLeft].Weight := xlThick;
Item[xlEdgeRight].LineStyle := xlContinuous;
Item[xlEdgeRight].Weight := xlThick;
end;
end;