怎么到处都有......
procedure TForm1.Button1Click(Sender: TObject);
var
ExcelApp: Variant;
S: string;
begin
ExcelApp := CreateOleObject( 'Excel.Application' );;
ExcelApp.Visible := True;
ExcelApp.WorkBooks.Open( 'C:\Demo.xls' );
ExcelApp.WorkSheets[1].Activate;
S := ExcelApp.Cells[2,2].Value;
ShowMessage(S);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
ExcelApp: Variant;
S: string;
begin
ExcelApp := CreateOleObject( 'Excel.Application' );;
ExcelApp.Visible := True;
ExcelApp.WorkBooks.Open( 'C:\Demo.xls' );
ExcelApp.WorkSheets[1].Activate;
S := ExcelApp.Cells[2,2].Value;
ShowMessage(S);
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货