Page 1 of 1

The Import Function

Posted: Tue Feb 02, 2010 3:09 pm
by tchaithonov
Hi All,

I am trying to update my old eviews 6 programs and found out that the import function is not as easy as I thought it would be. Say if I am importing several sheets from the same Excel 2007 file using a loop (same data format in each of these sheets), and the top leftmost numeric value of these sheets all start in the cell B6, how should I specify the import function?

So far, I have:

Code: Select all

import(type="excelxml", page=Daily) %file_loc range={%tab_current}
where %file_loc is the location of the file, and the %tab_current is the current tab name. I wonder how I can make it read only from B5 (variable names)? Please let me know. Thanks.

Tchaithonov

Re: The Import Function

Posted: Tue Feb 02, 2010 4:15 pm
by EViews Jason
something similiar to

Code: Select all

import(t=excelxml) book1.xlsx range="sheet2!a1:a10"
will work

Re: The Import Function

Posted: Tue Feb 02, 2010 5:09 pm
by EViews Gareth
Further to Jason's response, since the "range" argument is expecting something enclosed in quotes, you probably don't want to put braces around your %tab_current variable, since putting braces around a string variable effectively removes the quotes.

You should also take a look at the program in the last post of this thread, since it does something pretty similar to what you are doing.