Problems when importing data from Excel

For questions regarding programming in the EViews programming language.

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

Namazbai
Posts: 7
Joined: Thu Jan 09, 2014 12:56 pm

Problems when importing data from Excel

Postby Namazbai » Thu Jan 09, 2014 1:06 pm

Hi everybody, my name is Namazbai and I hope you will be able to help me. I have a problem shown below:
I have to import data from Excel to Eviews using programming, so I use this way: File->New->Program and then I write coomand wfopen c:\Users\Namaz\Desctop\data.xlsx. But when I run program this code doesn't work, so I don't know what to do. In the Excel file there several columns with time series of GDP, CPI, etc. The data is quarterly. My general target is building a program, that will be able to import data from Excel file, check it for stationarity, seasonality and build ARMA/ARIMA's. But unfortunatly I couldn't even import data((( I'm sorry for this silly question, I work well with Eviews using interface, but I haven't experience in programming, please help me. Thanks!

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

Re: Problems when importing data from Excel

Postby EViews Gareth » Thu Jan 09, 2014 1:10 pm

Could you define what you mean by "doesn't work"?

Namazbai
Posts: 7
Joined: Thu Jan 09, 2014 12:56 pm

Re: Problems when importing data from Excel

Postby Namazbai » Thu Jan 09, 2014 11:14 pm

Fortunately it worked when I tried this function in Eviews 6, previous unsuccesfull attempt was on Eviews 3. But now I have another problem, so could you help Gareth, if it's possible. My trouble is again connected with importing data using command read.. I have Excel file with GDP, UNEMPLOYMENT, CPI and M1,M2 variables, so I must import this data to eviews workfile to start my research. This excel file is regularly renewing - I add new odservations, delete some series and add new series.
So, my trouble is that I can't make a code, that is able to import data dynamically, without correcting of read command. For example, I import 3 variables - GDP, CPI and Unemployment (100 observations). I create undated eviews workfile with 100 obs, then I type: read(a2,s="sheet3") "c:\path" 3 . After running programm this command qualitatively imports data, but when I expand my Excel file adding new variables and changing the size of sample I've to correct code, for example I add to Excel M1 and M2 aggregates, so I open the program and type read(a2,s="sheet3") "c:\path" 5 . How can I make a code, that is able to import data from Excel dynamically without my permanent corrections? Thank you, Gareth!

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

Re: Problems when importing data from Excel

Postby EViews Gareth » Thu Jan 09, 2014 11:18 pm

Read cannot do it. You'll need to use wfopen, or import (in EViews 8)

Namazbai
Posts: 7
Joined: Thu Jan 09, 2014 12:56 pm

Re: Problems when importing data from Excel

Postby Namazbai » Mon Jan 13, 2014 12:58 am

Thank you very much!!! (Y)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests