Re: [amibroker] Re: AFL code to write to Excel - work OK then changing range in analysis, errors and malfunctioning

 

Hello,

Thank you very much for your e-mail.

CreateStaticObject works fine (creates object once and keeps it).
CreateObject by design creates object each time it is called and destroys it as soon as formula terminates.

As for "method does not exist" - this is reported by Excel's OLE interface. AmiBroker asks for method you specified
and Excel responds. If it responds that it does not have given method you are getting error message.

As to why Excel gives you this behavior you need to ask Microsoft.

Best regards,
Tomasz Janeczko
amibroker.com

On 2016-07-28 01:54, johanm.email@yahoo.com [amibroker] wrote:
Hi All,

Using

excel = CreateStaticObject( "Excel.Application" ); wb = excel.WorkBooks; is very temperamental on my computer. Gives sometimes a "method does not exist error" and sometimes it works. Not sure what I am doing wrong even when those two lines are the only two lines in my afl code (and excel open). But I also see that if I useCreateObject I can see a process called "conhost.exe" is added to the system every second.

I want to use the excel functionality from inside a chart where I press a button and information is sent to Excel.

Anybody with an idea what is wrong?

Using AB Prof 64bit, Win7 64bit and Excel 2007

Regards

Johan


__._,_.___

Posted by: Tomasz Janeczko <groups@amibroker.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (17)

Check out the automatic photo album with 1 photo(s) from this topic.
Amibroker Settings.JPG

Save time and get your email on the go with the Yahoo Mail app
Get the beautifully designed, lighting fast, and easy-to-use Yahoo Mail today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon