Salut tout le monde,
J ai utilisé les objet OLE2 dan smon application Forms pour charger un fichier excel dans un block a fin de l'inserer dans la base,
le chargement marche bien, mais j ai un petit probleme avec le process de excel. J ai utiliser la fonction fermer_excel suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 PROCEDURE fermer_excel IS BEGIN client_OLE2.SET_PROPERTY(application, 'DisplayAlerts', 0); Client_Ole2.Set_Property(application, 'Visible', 0); client_ole2.invoke (application, 'Quit'); g_excel_ouvert := FALSE; IF cell IS NOT NULL THEN client_ole2.RELEASE_OBJ (cell); END IF; IF worksheet IS NOT NULL THEN client_ole2.RELEASE_OBJ (worksheet); END IF; IF worksheets IS NOT NULL THEN client_ole2.RELEASE_OBJ (worksheets); END IF; IF workbook IS NOT NULL THEN client_ole2.RELEASE_OBJ (workbook); END IF; IF workbooks IS NOT NULL THEN client_ole2.RELEASE_OBJ (workbooks); END IF; client_ole2.invoke (application, 'Quit'); IF application IS NOT NULL THEN client_ole2.RELEASE_OBJ (application); END IF; END;
Mais tjr excel est present ds le gestionaire des taches
Partager