Read in Data to Excel from database in VBA

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Read in Data to Excel from database in VBA

Postby dravenous » Tue Sep 15, 2015 2:07 pm

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

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

Re: Read in Data to Excel from database in VBA

Postby EViews Gareth » Tue Sep 15, 2015 2:09 pm

Look at the application.getseries example in the last of those whitepapers.
Follow us on Twitter @IHSEViews

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Re: Read in Data to Excel from database in VBA

Postby dravenous » Tue Sep 15, 2015 2:12 pm

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?

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

Re: Read in Data to Excel from database in VBA

Postby EViews Gareth » Tue Sep 15, 2015 2:15 pm

Yes.
Follow us on Twitter @IHSEViews

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Re: Read in Data to Excel from database in VBA

Postby dravenous » Fri Sep 18, 2015 11:46 am

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)

dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Re: Read in Data to Excel from database in VBA

Postby dravenous » Fri Sep 18, 2015 12:39 pm


dravenous
Posts: 33
Joined: Thu Jan 29, 2015 2:30 pm

Re: Read in Data to Excel from database in VBA

Postby dravenous » Mon Sep 21, 2015 12:31 pm

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.....


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 19 guests