Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

another excel question

Former Member
0 Likes
503

hi,

I read an excel file like this:

CREATE OBJECT gv_excel 'Excel.Application'.

SET PROPERTY OF gv_excel 'VISIBLE' = 0.

CALL METHOD OF gv_excel 'Workbooks' = gv_books.

CALL METHOD OF gv_books 'Open'

EXPORTING

#1 = p_file

#2 = 1.

...

FREE OBJECT gv_cell.

FREE OBJECT gv_excel.

FREE OBJECT gv_books.

FREE OBJECT gv_sheet.

CALL METHOD OF gv_excel 'QUIT'.

the question is, why the excel process is not kill in the task manager?

joseph

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
421

I'm guessing that it may have something to do with the fact that you are freeing the object before you are actually "quitting" it. I think that "freeing" disconnects the pointers? Try moving the FREE statements to after the "QUIT" method.

Regards,

Rich Heilman

3 REPLIES 3
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
422

I'm guessing that it may have something to do with the fact that you are freeing the object before you are actually "quitting" it. I think that "freeing" disconnects the pointers? Try moving the FREE statements to after the "QUIT" method.

Regards,

Rich Heilman

Read only

0 Likes
421

thank you!!

Read only

0 Likes
421

Hi ,

i think Rich is right.

another problem could be if you've used an object to

save your data:

like :

CALL METHOD  OF H_EXCEL 'Save' = h_save.      

so you've to free this too:

FREE OBJECT H_save.     

regards Andreas