Home » Developer & Programmer » Forms » Export données vers excel (forms 9i, OAS 10g)
Export données vers excel [message #277705] Wed, 31 October 2007 04:35 Go to next message
majed_ennadher
Messages: 3
Registered: October 2007
Location: tunisie
Junior Member
Bonjour,
J'ai un petit problme concernant l'export des donnes partir de forms vers excel, j'utilise forms 9i, OAS 10g, je pense que la configuration de webutil est correcte.
le problme est la suivante:
-------------------------------------------------------
Exception occurred during event dispatching:

java.lang.NoClassDefFoundError

at oracle.forms.webutil.ole.OleFunctions.create_obj(OleFunctions.java:513)

at oracle.forms.webutil.ole.OleFunctions.getProperty(OleFunctions.java:218)

-------------------------------------------------------
j'utilise la procdure suivante:
-------------------------------------------------------
PROCEDURE Export_to_Excel (Block varchar2,NbrCol number,Nbrlig number) IS
BEGIN
  DECLARE
  	Excel client_OLE2.OBJ_TYPE;
  	WorkBooks client_OLE2.OBJ_TYPE;
  	WorkBook client_OLE2.OBJ_TYPE;  
  	Sheet client_OLE2.OBJ_TYPE;
  	range client_OLE2.OBJ_TYPE;
  	arguments client_OLE2.LIST_TYPE;
  	compteur number := 1;
  	ligne number := 1;
  	dernier number := 0;
  begin
      SYNCHRONIZE; 
  	  Excel := client_OLE2.create_obj('Excel.application');
  	  WorkBooks := client_OLE2.get_obj_property(Excel,'WorkBooks');
  	  WorkBook := client_OLE2.invoke_obj(WorkBooks,'ADD');
  	  Sheet := client_OLE2.get_obj_property(WorkBook,'ActiveSheet');
  	  go_block(block);
  	  last_record;
  	  dernier := :system.cursor_record;
  	  first_record;
  	  set_application_property(CURSOR_STYLE,'BUSY');
  	      while ligne <= Nbrlig 
  	       
  	        LOOP 
  	        arguments := client_OLE2.create_arglist;
  	        client_OLE2.add_arg(arguments,to_number(:system.cursor_record));
  	        client_OLE2.add_arg(arguments,compteur);
  	        range := client_OLE2.get_obj_property(Sheet,'Cells',arguments);
  	        client_OLE2.set_property(range,'Value',:system.current_value);
  	        client_OLE2.destroy_arglist(arguments);
  	        if compteur < Nbrcol then
  	          compteur := compteur + 1 ; 
  	          next_item;
  	        else
  	        	compteur := 1 ; 
  	        	next_record;
  	        	ligne := ligne + 1;
  	        end if;	
  	        end loop;	
  	  set_application_property(CURSOR_STYLE,'DEFAULT'); 
  	  client_OLE2.Invoke(Sheet,'SaveAs');     
  	  client_OLE2.set_property(Excel,'Visible',1);
  	end;
END;
-------------------------------------------------------
qq peut m'aider SVP

Upd=mod: Please use 'code' tags. SVP predates IM speak but 'qq' is IM speak. Please don't use IM speak.

[Updated on: Wed, 31 October 2007 18:07] by Moderator

Report message to a moderator

Re: Export données vers excel [message #277713 is a reply to message #277705] Wed, 31 October 2007 05:03 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Translation:

Hello,
I have a small problem when exporting data from Forms to Excel. I use Forms 9i, OAS 10g. I think that the configuration of WebUtil is ok.

See previous post for details on the error.

MHE
Re: Export données vers excel [message #277717 is a reply to message #277713] Wed, 31 October 2007 05:22 Go to previous messageGo to next message
majed_ennadher
Messages: 3
Registered: October 2007
Location: tunisie
Junior Member
Thank you maher
Re: Export données vers excel [message #277741 is a reply to message #277717] Wed, 31 October 2007 05:57 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
That's ok Wink. I'll close the thread in the French forum. You'll have more exposure here.

MHE
Re: Export données vers excel [message #277837 is a reply to message #277705] Wed, 31 October 2007 18:08 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Search this forum for 'excel' and you will find:
Worked example for using Excel through ODBC
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:4406709207206#18830681837358

Excel via DDE
http://www.orafaq.com/forum/m/260061/67467/#msg_260061

Working with Excel via OLE2
http://www.orafaq.com/forum/t/72811/67467/
http://www.orafaq.com/forum/m/84230/67467/
Merge two cells in Excel using ole2
http://www.orafaq.com/forum/t/77825/67467/
Error closing Excel file generated using OLE2
http://www.orafaq.com/forum/t/77351/67467/
How to wrap text in excel cell using ole2
http://forums.oracle.com/forums/thread.jspa;jsessionid=8d92200830d62336f40f5aad44efb36ee981f4e6c19e.e34QbhuKaxmMai0MaNeMb3eKb390?mess ageID=1242535&#1242535
Forms to Excel example with webutil
http://forums.oracle.com/forums/thread.jspa?messageID=1430799
Another Forms to Excel example
http://www.orafaq.com/forum/t/81537/67467/
http://www.orafaq.com/forum/t/32353/67467/
How to kill EXCEL.exe from Task Manager from Oracle Forms
http://www.orafaq.com/forum/t/88643/67467/
how do i display all excel worksheets name in form
http://www.orafaq.com/forum/t/89775/67467/
More Excel stuff
http://www.orafaq.com/forum/t/90502/67467/

David
Re: Export données vers excel [message #278442 is a reply to message #277705] Sun, 04 November 2007 04:38 Go to previous message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Copie de mon message dans le forum "French":
Michel Cadot wrote on Sun, 04 November 2007 11:33

Je ne connais pas la rponse mais il serait bon que tu lises le Guide du Forum, en particulier les sections sur le formatage et le "IM speak" (langage SMS).

Nanmoins, l'erreur "access denied" semble indiqu un problme d'accs, vrifie que l'utilisateur a les droits d'criture sur le rpertoire et fichier que tu veux crer.

Cordialement,
Michel


Previous Topic: Combo box
Next Topic: help with execute_query
Goto Forum:
  


Current Time: Fri Dec 02 16:35:43 CST 2016

Total time taken to generate the page: 0.21495 seconds