ADO Database Delphi

{Form üzerine ole serverla baglanti kurmak icin "servers" bilesenlerinden "ExcelApplication" nesnesini eklemeniz gerekir.
IRange.AutoFormat(6,Null,Null,Null,Null,Null,Null); Bu Satirdaki Rakami 1-15 arasinada Degistirerek degisik Formatlar elde edebilirsiniz}
procedure TForm1.Button1Click(Sender: TObject);
var IRange : Excel97.Range;
i,Row : integer;
begin
if not ExcelApplication1.Visible[0] then //excel acikmi
begin
excelApplication1.Visible[0]:= True; //acik degilse ac
excelApplication1.Workbooks.Add(NULL,0); //yeni calisma kitabi olustur
end
else //excel aciksa yeni calisma sayfasi ekle
excelApplication1.Sheets.Add(Null,null,null,null,1);
// Alan Basliklarini aktar
IRange := excelApplication1.ActiveCell;
for i := 0 to Table1.Fields.count-1 do
begin
IRange.Value := Table1.Fields[i].DisplayLabel;
IRange := IRange.Next;
end;
// Kayitlari Aktar
Table1.DisableControls;
try
Table1.First;
Row :=2;
while Not Table1.Eof do
begin
IRange := ExcelApplication1.Range['A'+IntToStr(Row),'A'+IntToStr(Row)];
for i := 0 to Table1.Fields.Count-1 do
begin
IRange.Value := Table1.Fields[i].Value;
IRange := IRange.Next;
end;
Table1.Next;
Inc(Row);
end;
finally
Table1.EnableControls;
end;
// Auto format
IRange:= ExcelApplication1.Range['A1','D'+IntToStr(Row-1)];
IRange.AutoFormat(6,Null,Null,Null,Null,Null,Null);
end;