Page 1 of 1

Exporting and Importing to/from Excel spreadsheet

Posted: Fri Feb 11, 2011 10:16 am
by facosta
Hello, thank you for the help here.

I would like to ask two questions about EViews-Excel:

1) Is there a way to export the coefficients of a particular regression to some specific cells of an excel sheet?
For example if I regress: Y=B*X1+D*X2+e, is it possible to export to the Cells B2 and B3 of the sheet "Coefficients" of the excel file "Regression" the values of B and D, the coefficients of the regression?

2) When importing from excel I know a way of doing it given the name of the file, the name of the sheet and the date, as for example:
wfcreate(wf=Data_Levles, page=Variables) q 1996:1 2010:2
read(b15, s=Data) "C:\Work\Date.xls" 1

Can I import from the excel file without giving the end date? I would like to import all the data existing in the excel sheet and then to give it the frequency. I also know how to give the date structure to the workfile with a variable imported from excel, but I don´t know how to make eviews to import all the data from the sheet (ie without giving neither the number of rows nor columns to be imported)

Thank you very much for all the assistance.
Regards.

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Fri Feb 11, 2011 10:19 am
by EViews Gareth
1. This is somewhat of an open ended question. With a good knowledge of VBA for Excel, yes you can do it using COM. Without that, you're out of luck.

2. You should use the IMPORT command rather than the READ command.

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Fri Feb 11, 2011 10:31 am
by facosta
Ok, thanks. In fact I know VB for excel, but I don´t know how to relate it to Eviews, is COM a tool for that?
Thanks.

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Fri Feb 11, 2011 10:40 am
by EViews Gareth
Yes. You should read through the COM whitepaper here:
http://eviews.com/download/download.html#docs

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Fri May 13, 2011 7:59 am
by maragloria
Hi There,

I also have a question similar to question 2.

I am using the import comand and I would like to know how to tell Eviews that the dates are in the excel column A.
The data in excel is daily, 5-days week. I tried using the command @freq d5 but this, if I am not mistaken, does not make Eviews recognize that the data in column A are dates.

Here is the command I am using:

import(mode="o", page={%pays}) {%xlsfile} range={%pays}!$A$1:$W$5581 colhead=6 namepos=last na="#N/A N/A" @freq d5 @smpl @all

Thanks for your help,

Mara

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Fri May 13, 2011 8:25 am
by maragloria
Please ignore my previous question. The code is working properly. Thanks.

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Wed May 18, 2011 10:44 am
by sdbailey
I have a different exporting question-- I'm seasonally adjusting a number of data series in a program, and generating the seasonal factors and the adjusted data-- how do I export these into excel files within the program? Thanks for any assistance.

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Wed May 18, 2011 10:46 am
by EViews Gareth
You can use the WFSAVE command to save to a new Excel file.

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Wed May 18, 2011 10:59 am
by sdbailey
Thanks, is that available in version 4.1? I couldn't find it in the index.

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Wed May 18, 2011 11:00 am
by EViews Gareth
No.

You might be able to use the write command.

Re: Exporting and Importing to/from Excel spreadsheet

Posted: Wed May 18, 2011 11:29 am
by sdbailey
That works. Thanks!