![]() |
Exceldatei als Html-Datei speichern - störender Dialog
Hallo,
ich versuche eine Exceldatei als Html-Datei zu speichern, klappt auch so:
Delphi-Quellcode:
Mein Problem ist, ist c:\filename.html schon vorhanden gibt's einen Dialog den ich nicht haben möchte
procedure TForm1.Button1Click(Sender: TObject);
var ExcelApp,Sheet :variant; Workbook:_Workbook; begin ExcelApp:=createoleobject('excel.application'); ExcelApp.Workbooks.open(ExtractFilePath(Application.ExeName)+'1.xls',EmptyParam, EmptyParam, EmptyParam,EmptyParam, EmptyParam, EmptyParam, EmptyParam,EmptyParam, EmptyParam); ExcelApp.ActiveWorkBook.SaveAs('c:\filename.html',FileFormat:=xlHtml,ReadOnlyRecommended:=false,CreateBackup:=False); ExcelApp.DisplayAlerts := False; ExcelApp.:=Unassigned; ExcelApp.Quit; end; Zitat:
gruss vom capo |
Re: Exceldatei als Html-Datei speichern - störender Dialog
Datei vorher Löschen.
|
Re: Exceldatei als Html-Datei speichern - störender Dialog
Hi,
ich würde DisplayAlerts auf False setzen, bevor ich die Methode Save() aufrufe. Gute Nacht |
Re: Exceldatei als Html-Datei speichern - störender Dialog
Hallo marabu...
genau das war es. Vielen Dank für die Antworten. gruss capo |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:20 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz