how to disable dialog when saving xls file using ExcelApplication in delphi it is not working when DisplayAlerts is set to False
You can try using the following code to disable the dialog when saving an xls file using Excel.Application in Delphi:
ExcelApp.DisplayAlerts := False;
ExcelApp.ActiveWorkbook.SaveAs(FileName, xlExcel8);
ExcelApp.DisplayAlerts := True;
Note that you need to set DisplayAlerts to False before saving the file, and then set it back to True afterwards. Also, make sure that you are using the correct file format (xlExcel8 in this example) for your xls file.
原文地址: https://www.cveoy.top/t/topic/dIm0 著作权归作者所有。请勿转载和采集!