Home » Developer & Programmer » Forms » Export query to excel
Export query to excel [message #297739] Sun, 03 February 2008 03:57 Go to next message
FirstKnight
Messages: 8
Registered: August 2007
Junior Member
Dears,
I realy had searched alot and i couldn't find any solution to my problem which is :-
i have server/client application (unix server) using forms 6i
and i want to create a form to fetch a data from a table
into an excel sheet which can be saved on the client pc
i did manage to create csv file and put my data into it and saved it on the server using utl_file
the quistion is :-
how could i allow the user save this file on his/her machine
so he could open it .

any help will be higly appreciate it.
Kind Regards.
Re: Export query to excel [message #297754 is a reply to message #297739] Sun, 03 February 2008 06:50 Go to previous messageGo to next message
akramrabaya
Messages: 41
Registered: November 2007
Member
i used to have some how same problems to transfere to and from excel ..

i found one fmb. file from, the old mesages it help me to understand this subject and solve my problems



am sorry cuz i 4get the user who create this file i just copy and paste this file and repass it 4 u



Re: Export query to excel [message #297762 is a reply to message #297739] Sun, 03 February 2008 09:24 Go to previous messageGo to next message
FirstKnight
Messages: 8
Registered: August 2007
Junior Member
thank you very much akramrabaya
but i kept trying web.show_document and finaly i got it work
thank you again akramrabaya i realy appreciate it
Best Regards
Re: Export query to excel [message #297832 is a reply to message #297762] Sun, 03 February 2008 23:06 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Please post your code. I usually recommend using 'd2kwutil' for defining the location of the 'saved' file when using Forms 6i.

David
Re: Export query to excel [message #297924 is a reply to message #297739] Mon, 04 February 2008 04:18 Go to previous message
FirstKnight
Messages: 8
Registered: August 2007
Junior Member
my pleasure david,
first thing you have to know the path of your report services on the application server which you can access it by the following url
http(s)://<your server path>:<port>/<your reports path>/<your file name>

actually <your reports path> is an environment variable which you can know the working directory for it
by logging to your application server using telnet and use these commands to know the working dirctory

cd $<your reports path>
pwd


after you know your working directory use it to write your files on that directory using text_io, by the way i did use text_io not utl_file
because utl_file save your file on the database server not on the application server

anyway here is the code :-
web.show_document('http(s)://<your server path>:<port>/<your reports path>/<your file name>','_blank');


and then you can choose where to save it on the client
Regards.






[Updated on: Mon, 04 February 2008 04:21]

Report message to a moderator

Previous Topic: Need your help on ORA-306500
Next Topic: Case is not working in Forms Why?
Goto Forum:
  


Current Time: Thu Dec 08 10:38:50 CST 2016

Total time taken to generate the page: 0.09589 seconds