Home » Non-English Forums » French » [ Export données vers excel] (Oracle Forms 9i, OAS10g)
[ Export données vers excel] [message #277688] Wed, 31 October 2007 03:21 Go to previous message
majed_ennadher
Messages: 3
Registered: October 2007
Location: tunisie
Junior Member
Bonjour,
j'utilise oracle forms 9i , oas 10g comme serveur d'application,
le problme c'est l'export des donnes vers excel, a noter que la configuration de webutil est correcte.
j'utilise le code suivant:


---------------------------------------------------D
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;
-------------------------------------------------F


l'erreur est la suivante:
Exception occurred during event dispatching:
--------------------------------------D
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.lang.RuntimePermission loadLibrary.jacob)
---------------------------------------F

qq peut m'aider SVP
 
Read Message
Read Message
Previous Topic: compiling french forms
Next Topic: Bonjour!
Goto Forum:
  


Current Time: Tue Jan 28 10:46:43 CST 2020