15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


OLE Automation: Excel - SaveAs behaves unreliable

Ludek Slegr -- ludek.slegr@munich.ixos.de
Monday, January 08, 1996


Hallo MFC and OLE experts,

We are using OLE Automation to control Excel. Everything works fine with one 
exception. When I try to save my workbook using Workbook method SaveAs or 
SaveCopyAs, I get an OLE exception. The strange is, that the method works 
fine, when I set breakpoint on the line, when the method is called.

Could it be, that there is some timing problem ?
Could it be, that I do not initialize Excel properly ?
Any other idea, when the problem could be hidden ?

Thanks for any idea in advance!

Regards,
Ludek Slegr



Brad Wilson -- bradw@netnet.net
Monday, January 08, 1996

>> We are using OLE Automation to control Excel. Everything works fine with one 
>> exception. When I try to save my workbook using Workbook method SaveAs or 
>> SaveCopyAs, I get an OLE exception. The strange is, that the method works 
>> fine, when I set breakpoint on the line, when the method is called.

Have you tried turning all compiler optimizations off?  Sometimes what
you see is a compilation problem with the instruction cache ... when
you try and debug it the instruction cache gets cleared (obviously,
because you branch off into the debugger and thus eradicate the cache).
I had similar style problems with C 6.0 (a long time ago :-).

Good luck!
Brad





| Вернуться в корень Архива |