mg_ocx


Adrian Wick
 

Thank you for the file! I'll take a look.

Regards
A


Hans Brussaard
 

Make sure to release all loaded objects

See attached sample program.

 

Van: main@magicu-l.groups.io <main@magicu-l.groups.io> Namens Adrian Wick
Verzonden: woensdag 21 september 2022 06:11
Aan: main@magicu-l.groups.io
Onderwerp: Re: [magicu-l] mg_ocx

 

Hm,

i must be doing something wrong.

what is the correct order of steps for saving and closing excel? The problem i have is that excel never gets closed,
its hidden, but if i go into the task manager, i can still see the excel opened ... If i open the file, i get a warning that
another session is already opened for the file. If i close the excel task in task manager, nothing is stored in the file.

Can you please tell me the order of invokes i need to use in order to save and close everything.

Thank you.


Adrian Wick
 

Hm,

one more thing i just saw ... when i invoke udp for 'Save' i get an error:

"User module not found/loaded"

Regards
A


Adrian Wick
 

Hm,

i must be doing something wrong.

what is the correct order of steps for saving and closing excel? The problem i have is that excel never gets closed,
its hidden, but if i go into the task manager, i can still see the excel opened ... If i open the file, i get a warning that
another session is already opened for the file. If i close the excel task in task manager, nothing is stored in the file.

Can you please tell me the order of invokes i need to use in order to save and close everything.

Thank you.


Adrian Wick
 

Thank you!

I will give it a try later on!

Regards
A


Hans Brussaard
 

Hide Excel: Invoke UDP ‘@mg_ocx.PropSet’ with arguments: ‘4AA44’, applicationHandle, ‘Visible’, ‘2’, 0, returnCode

Save workbook: Invoke UDP ‘@mg_ocx.MethodCall’ with arguments: ‘4AA4’, workbookHandle, ‘Save’, ‘0’, returnCode

 

Regards,

Hans

 

Van: main@magicu-l.groups.io <main@magicu-l.groups.io> Namens Adrian Wick
Verzonden: dinsdag 20 september 2022 14:51
Aan: main@magicu-l.groups.io
Onderwerp: [magicu-l] mg_ocx

 

Hello wizards,

i am using mg_ocx to read excel files and write into excel. And in order to save the populated excel file
i open up the excel and i have to than click save to actually save the modified values. The problem is now
that i don't want the excel to be shown. Is there a way to populate the excel and force excel to save the inserted
data? I just need this last part ... Everything else is working.

I know there are other ways to populate excel ... i just don't want to rewrite the whole batch just to solve this
problem. There must be a way to do it the "old" way with 1 line of code. (at least i hope there is :D)

Thank you.
A


Adrian Wick
 

Hello wizards,

i am using mg_ocx to read excel files and write into excel. And in order to save the populated excel file
i open up the excel and i have to than click save to actually save the modified values. The problem is now
that i don't want the excel to be shown. Is there a way to populate the excel and force excel to save the inserted
data? I just need this last part ... Everything else is working.

I know there are other ways to populate excel ... i just don't want to rewrite the whole batch just to solve this
problem. There must be a way to do it the "old" way with 1 line of code. (at least i hope there is :D)

Thank you.
A