search for excel.exe in computer [message #260930] |
Tue, 21 August 2007 05:06  |
ganesh_jadhav0509
Messages: 74 Registered: May 2007 Location: Chester
|
Member |

|
|
Hello all,
My query is that i want to generate a report in excel format so that i use dde.poke function for generate a excel report.
for that i have to begin the excel.exe i m giving some of the code. code is....
APPID := DDE.APP_BEGIN('c:\program files\microsoft office\office11\EXCEL.EXE ',dde.app_mode_normal);
for that i have to give fixed path of excel.exe
but in every machine path will be different of drive will be different so is there any other mode to begin the excel.exe
thanks in anticipation.
|
|
|
|
Re: search for excel.exe in computer [message #260953 is a reply to message #260930] |
Tue, 21 August 2007 05:48   |
hemavb
Messages: 103 Registered: May 2007 Location: Dubai , UAE
|
Senior Member |
|
|
you can fetch the details from the registry to give you the full path for running an excel file. Below is the procedure explained for Forms 6/6i. For IDS, you will have to find out.
in case you WILL HAVE to use d2kutil.pll, you can use the read_registry function in it... This library is included in the COmplete Developement installation done for D2K.
Once you have attached this library to your form, you will have to place the follwoing code before the DDE function.
it goes as...
V_EXCEL_FILE_PATH = win_api_environment.read_registry('HKEY_CLASSES_ROOT\APPLICATION\EXCEL.EXE\SHELL\EDIT\COMMAND', '(Default)', TRUE);
IF there is any error this statement will return "NO_DATA_FOUND" error.
In 99% cases it is safe to assume that the desired application, in this case Excel, is not installed on the PC.
This will return the path and file name to your excel executable.
You can use this in your DDE
...
APPID := DDE.APP_BEGIN(V_EXCEL_FILE_PATH, dde.app_mode_normal);
...
Using this i have attached even word, acrobat, internet explorer, autocad viewer, etc.
Hope it works for you.
- Hemavb
|
|
|
|
|
|
Re: search for excel.exe in computer [message #271168 is a reply to message #265766] |
Sun, 30 September 2007 06:51  |
hemavb
Messages: 103 Registered: May 2007 Location: Dubai , UAE
|
Senior Member |
|
|
ganesh_jadhav0509 wrote on Fri, 07 September 2007 14:40 | sorry one more error occured
FRM 40734 internal error:plsql error occured
thanxxxx
|
Ok as martin said we will need the code that you have used and the error mesg no and text.
But i would also like to know the version of forms that you are using and which installation? Complete or typical?
|
|
|