[WD17] Starting Excel from Windev

Startbeitrag von David Egan am 22.07.2013 05:00

Hi
I have a report which is sent straight to Excel. I want the user to optionally open up Excel with the file opened, much like the Print Preview does if you select Excel. I can't get it to work though.

I have used EXERUN("EXCEL.EXE repname.xls") which doesn't seem to do anything. Using exactly the same syntax with Notepad works correctly. I've also tried it with CompleteDir(fExeDir()) + repname.xls but with the same result. Excel is installed in the default location, can be called directly from Run, XLS files are associated with it etc so why doesn't it work?

I've also tried XLSOpen, which returns that it has opened the file but this also doesn't display Excel. Any ideas?

Thanks

David

Antworten:

Hi David, ShellExecute(..) seems to be your friend ...

von GuenterP - am 22.07.2013 05:42
That's it, thanks Guenter.:cheers:

David

von David Egan - am 22.07.2013 08:33
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.