excel: Variant;
WBk, WS, RG: OleVariant;
try
Excel := GetActiveOleObject('Excel.Application');
except
Excel := CreateOleObject('Excel.Application');
end;
wbk:=Excel.ActiveWorkbook;
RG:=WS.Range[WS.Cells[3,1],WS.Cells[9,9]];
RG.HorizontalAlignment := xlHAlignCenter;
RG.VerticalAlignment := xlHAlignCenter;
RG.WrapText := True;