Sorry, I don't have code for it.

But what if you "turned it around" and instead created an instance of AmiBroker 
from VBA using the AB object model?

--- In [email protected], "abxlab" <w2jc...@...> wrote:
>
> Thanks h3po! I'm not quite sure if DDE can work on a two-way fasion so that 
> AB and Excel could exchange some data. do you have any code sample showing 
> how to use DDE to interact with Excel?
> 
> abxlab
> 
> --- In [email protected], "h3po" <h3pooo@> wrote:
> >
> > Perhaps you can use Dynamic Data Exchange (DDE) if here are only specific 
> > cells that you want to update?
> > h
> > 
> > 
> > --- In [email protected], "abxlab" <w2jchen@> wrote:
> > >
> > > update it on my own...
> > > seems nobody bother to try this way. I finally figured it is impossible 
> > > for AB (thru Excel.Application object) to access an ever opened Excel 
> > > spreadsheet. It will actually open another copy of the same file, however 
> > > it is in READ-ONLY mode.
> > > 
> > > --- In [email protected], "amiespresso" <w2jchen@> wrote:
> > > >
> > > > 
> > > > Hello folks,
> > > > 
> > > > 
> > > > 
> > > > I've been searching for a solution for quite a while and explored all
> > > > what I could get, now I feel it's time to ask for help after enough
> > > > homework done with no luck...
> > > > 
> > > > 
> > > > 
> > > > To put it simple, I'd like to have AB exchange data back and forth with
> > > > an OPENED Excel file. Is it all possible?
> > > > 
> > > > 
> > > > 
> > > > To illustrate it more, I need a bridge b/w AB and Excel so that AB could
> > > > exchange data with Excel using Scan/Explore, or even during Backtesting
> > > > execution. The tricky part here is - I have the Excel worksheet opened,
> > > > for example, Sheet1 is for AB to dump something there, while Sheet2 has
> > > > my VBA code. And hopefully I still should be able to interact with Excel
> > > > while AB "talking" to THIS Excel instance.
> > > > 
> > > > 
> > > > 
> > > > Here I tried the following:
> > > > 
> > > > 1) XLPlugin - It looks like a right solution by moving data thru memory
> > > > copy between AB/XL. However after spending many days on this direction,
> > > > I was blocked by things I couldn't fix without its source code.
> > > > Basically, its sample.xls couldn't execute properly if AA has
> > > > Periodicity set as any non-Daily value. XLCase() doesn't work if for
> > > > example I run Scan/Explore on Hourly bars, which seem so strange. My
> > > > only guess is VB.net changed its RtlMemoryCopy() used by XLPlugin. This
> > > > function now has different signature from VB6, which may break things
> > > > somehow.
> > > > 
> > > > 
> > > > 
> > > > 2) I tried some sample code that uses "Excel.Application"
> > > > syntax. The problem here is that AB will initiate another copy of Excel,
> > > > NOT the one I opened with something loaded already. It's OK to
> > > > create a new sheet, load it with something, save it and close. But I
> > > > need interaction with my current Excel.
> > > > 
> > > > 
> > > > 
> > > > 3) Plain text or CSV file from AB to Excel is straightfoward, but
> > > > it's not capable of doing quick data exchange between AB and Excel.
> > > > 
> > > > 
> > > > 
> > > > Can anybody here to enlighten me with some idea or code if you ever
> > > > faced similar problem and resolved it?
> > > > 
> > > > 
> > > > 
> > > > Your input is much appreciated!
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > P.S. my envrionments
> > > > 
> > > > Windows XP and/or Windows 2003 Server Std Edition
> > > > 
> > > > Amibroker v5.20
> > > > 
> > > > Office Professional Edition 2003
> > > > 
> > > > Visual C++ 2005 Redistributable
> > > >
> > >
> >
>


Reply via email to