Page 1 of 1

Importing Labels from xls/xlsx

Posted: Thu Mar 05, 2015 4:52 am
by osindi
Hello,

Sorry if this has been answered already, haven't found any relevant details so far.
I'm trying to import data from an xls/xlsx file using eviews7.

I'm aware I can use the following command:

Code: Select all

import "path/file.xls" range="Sheet!A4:X100"
However, I often get a date specification error. Does the sheet need to have some sort of standard format with the dates in column A? How would i define the sample / frequency from the code without having the dates in the xls file.

Secondly, I'm also interested in importing the names from excel as well. This seems easy to do if the names are directly above the data, but what if it's a couple rows above the data?

E.g. How would I get the names of the series if it was given in the following format:

Row 1: Name
Row 2:Unwanted details
Row 3:Unwanted details
Row 4:Unwanted details
Row 5: Data starts
...
Row 100: End of Data

Appreciate any help.

Thanks,

osindi

Re: Importing Labels from xls/xlsx

Posted: Thu Mar 05, 2015 10:16 am
by EViews Gareth
Can you provide an example file?

Re: Importing Labels from xls/xlsx

Posted: Thu Mar 05, 2015 10:37 am
by osindi
Hi Eviews Gareth,

Sure. So the names I would want are in row 3 of the excel file. And the data starts from row 7.
Thanks,

Re: Importing Labels from xls/xlsx

Posted: Thu Mar 05, 2015 10:46 am
by EViews Gareth

Code: Select all

wfopen import_test.xls colhead=4 namepos=first

Re: Importing Labels from xls/xlsx

Posted: Thu Mar 05, 2015 10:51 am
by osindi
Thanks. Is there a way to do it using the import (or read function with xlsx)? or at least reading it directly to the current workfile?

Re: Importing Labels from xls/xlsx

Posted: Thu Mar 05, 2015 11:10 am
by EViews Gareth
Change wfopen to import.

Re: Importing Labels from xls/xlsx

Posted: Thu Mar 05, 2015 11:17 am
by osindi
great, thanks very much.

One last question though: Is it possible to import when the dates are not available? I guess you would need to specify what the dates are within the import function?

Thanks again!

Re: Importing Labels from xls/xlsx

Posted: Thu Mar 05, 2015 11:32 am
by EViews Gareth
Yes. The import documentation has details.