Page 1 of 1

Read in Data to Excel from database in VBA

Posted: Tue Sep 15, 2015 2:07 pm
by dravenous
I have been trying to figure out the most effective way to read in data to Excel with VBA code using eviews. I have been looking through a few references and can't seem to find exactly how to implement what I need.(examples below) I just need some VBA code that grabs a series from a specified databank over a certain sample period. I'm sure this is ridiculously simple, but any hints would be much appreciated.

Thanks!

http://www.eviews.com/download/whitepap ... _AddIn.pdf
http://www.eviews.com/download/whitepap ... Driver.pdf
http://www.eviews.com/download/whitepap ... mation.pdf

Re: Read in Data to Excel from database in VBA

Posted: Tue Sep 15, 2015 2:09 pm
by EViews Gareth
Look at the application.getseries example in the last of those whitepapers.

Re: Read in Data to Excel from database in VBA

Posted: Tue Sep 15, 2015 2:12 pm
by dravenous
Thanks for quick response.

I thought that was the closest to what I was after. Where do you specify the database you want? Do I have to individually open it within a workfile for that interface to work?

Re: Read in Data to Excel from database in VBA

Posted: Tue Sep 15, 2015 2:15 pm
by EViews Gareth
Yes.

Re: Read in Data to Excel from database in VBA

Posted: Fri Sep 18, 2015 11:46 am
by dravenous
Following up on this-- I have everything working beautifully in terms of importing from Eviews using the VBA, but is there a way to ensure that the data label is also imported? ( I guess technically "description" in eviews)

Re: Read in Data to Excel from database in VBA

Posted: Fri Sep 18, 2015 12:39 pm
by dravenous

Re: Read in Data to Excel from database in VBA

Posted: Mon Sep 21, 2015 12:31 pm
by dravenous
Does the app.Get below work with string objects? It doesn't seem to recognize them?

Code: Select all

Range(rng10).FormulaR1C1 = app.Get(S & emp & State, NATypeAsExcelNA)

Never mind, I got it to work. Forgot the quotes on the S.....