试试下面的代码:var FN: string; ExcelApp, FWorkBook: Variant;begin ...; ExcelApp.DisplayAlerts := False; FWorkBook := ExcelApp.WorkBooks.Open(FN); ...; ExcelApp.Save; ExcelApp.WorkBooks.Close; ExcelApp.DisplayAlerts := True; ExcelApp.Quit; ExcelApp := Unassigned; ...end;祝你好运。