Home » Developer & Programmer » Forms » search for excel.exe in computer
search for excel.exe in computer [message #260930] Tue, 21 August 2007 05:06 Go to next message
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 #260935 is a reply to message #260930] Tue, 21 August 2007 05:24 Go to previous messageGo to next message
sanka_yanka
Messages: 184
Registered: October 2005
Location: Kolkata
Senior Member

Why don't you use Web Util

Cheers
Sanka
Re: search for excel.exe in computer [message #260953 is a reply to message #260930] Tue, 21 August 2007 05:48 Go to previous messageGo to next message
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 #265761 is a reply to message #260953] Fri, 07 September 2007 05:23 Go to previous messageGo to next message
ganesh_jadhav0509
Messages: 74
Registered: May 2007
Location: Chester
Member

Thanks hema,

But while runing this report it is asking invalid parameters can u help me

Re: search for excel.exe in computer [message #265766 is a reply to message #265761] Fri, 07 September 2007 05:40 Go to previous messageGo to next message
ganesh_jadhav0509
Messages: 74
Registered: May 2007
Location: Chester
Member

sorry one more error occured

FRM 40734 internal error:plsql error occured

thanxxxx
Re: search for excel.exe in computer [message #266504 is a reply to message #265761] Tue, 11 September 2007 01:15 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please post your code and also post the error number and error message text.

David
Re: search for excel.exe in computer [message #271168 is a reply to message #265766] Sun, 30 September 2007 06:51 Go to previous message
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?
Previous Topic: how i can navigate throw forms items
Next Topic: How to use LIKE operator in develoepr 10g
Goto Forum:
  


Current Time: Mon Mar 10 14:37:33 CDT 2025