COM Automation - Get an Alpha series

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

SVeitch
Posts: 3
Joined: Tue Apr 09, 2013 7:45 am

COM Automation - Get an Alpha series

Postby SVeitch » Tue Apr 09, 2013 7:56 am

All,

I'm trying to write a short code to put out some data, with dates and titles out of EViews and on to and excel spread sheet. But i seem to hav hit a weird issue with the dates, instead of putting a single date into each cell. Each cell ends will a series of dates, starting with the correct date, and then running to the last observation in the file.

The VBA code is

Scommand = "Alpha ZZ_temp = @STRDATE(" & Chr(34) & " DD/MM/YYYY " & Chr(34) & " ) "
app.Run (Scommand)
Dates = app.Get("ZZ_temp")
rows = UBound(Dates, 1) - LBound(Dates, 1) + 1
WST_TV.Range(WST_TV.Cells(4, 1), WST_TV.Cells(3 + rows, 1)) = Dates

What am i doing wrong? I can look at ZZ_Temp and it looks like what I need, but it doesn't seem to be pulling through to excel correctly.

Is there a better way to pull dates out? It feels like i've missed a trick somewhere.

I'm currently using Eviews V7.2

Kind Regards

Sam

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13604
Joined: Tue Sep 16, 2008 5:38 pm

Re: COM Automation - Get an Alpha series

Postby EViews Gareth » Tue Apr 09, 2013 8:13 am

Unfortunately our resident COM expert, Steve, is on vacation this week. Might take a while to get an answer :(

SVeitch
Posts: 3
Joined: Tue Apr 09, 2013 7:45 am

Re: COM Automation - Get an Alpha series

Postby SVeitch » Tue Apr 09, 2013 8:54 am

OK, No worries.

EViews Steve
EViews Developer
Posts: 844
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: COM Automation - Get an Alpha series

Postby EViews Steve » Mon Apr 15, 2013 8:04 am

In the last line of your VBA code, make it say:
WST_TV.Range(WST_TV.Cells(4, 1), WST_TV.Cells(3 + rows, 1)).Value = Dates

Steve

SVeitch
Posts: 3
Joined: Tue Apr 09, 2013 7:45 am

Re: COM Automation - Get an Alpha series

Postby SVeitch » Mon Apr 15, 2013 9:56 am

Sorry, but i still get the same issue.

EViews Steve
EViews Developer
Posts: 844
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: COM Automation - Get an Alpha series

Postby EViews Steve » Mon Apr 15, 2013 3:25 pm

Ok, I was able to confirm this is a bug. I'll let you know when we have a fix for this...

EViews Steve
EViews Developer
Posts: 844
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: COM Automation - Get an Alpha series

Postby EViews Steve » Tue Apr 16, 2013 9:03 am

This bug has been fixed and will be in the next patch. Not sure when the patch is being released but it should be soon.

Steve

EViews Steve
EViews Developer
Posts: 844
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: COM Automation - Get an Alpha series

Postby EViews Steve » Tue Apr 16, 2013 4:07 pm

Ok, patch for this bug has been built and released. Look for Build Date of: April 16, 2013.

Steve


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests