var
ExcelApp,FWorkBook:variant;
ExcelFileName:string;
FieldNo,RecNo,i,j:integer;
FPicture,FWorksheet:OleVariant;
TmpStr,test:String;
begin
ExcelFileName:=Excel_Edt.Text;
ExcelAPP:=CreateOleObject('Excel.application');//Excel编程
FWorkBook:=ExcelAPP.WorkBooks.Add;
FWorksheet:=FWorkBook.Worksheets[1];
FWorksheet.Select;
(做你自己想做的事情)
FWorkBook.saveas(ExcelFileName);
FWorkBook.close;
ShowMessage('保存文件成功');