HotXLS 문서

AfterExport 이벤트

dbgrid가 Excel로 내보내진 후 발생합니다

설명

이 이벤트를 사용하여 전체 내보내기 영역에 추가 서식을 적용할 수 있습니다

구문

TDBGridAfterExport = procedure (Sender: TObject; Range: IXLSRange) of object;
Sender TObject. 지정합니다 TGridToXLS 컴포넌트 triggered 이벤트
Range 전체 내보내기 영역을 포함하는 범위를 나타내는 IXLSRange

예제

이 예제는 내보낸 영역 주위에 굵은 테두리를 추가합니다

procedure TForm1.GridToXLS1AfterExport(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;