Documentação do HotXLS

Evento AfterExport

Ocorre depois de o dataset ser exportado para a Folha de Cálculo

Descrição

Pode utilizar este evento para aplicar formatação adicional a toda a área exportada

Sintaxe

TAfterExport = procedure (Sender: TObject; Range: IXLSRange) of object;
Sender TObject. Especifica o componente TDataToXLS que desencadeou o evento
Range IXLSRange. Representa um intervalo que contém toda a área exportada

Exemplo

This example puts the thick border around the exported area

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;