Import only one cell from Excel

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

pelleenglund
Posts: 19
Joined: Fri Sep 16, 2016 6:35 am

Import only one cell from Excel

Postby pelleenglund » Tue Oct 11, 2016 2:23 am

Hello,

I am using the import-command to read data from an Excel file to EViews, but I only want to read a specific cell. The code could look like this:

Import C:\Temp\Data.xlsx Range="Tmp!A2:A2" @Freq 2016M09 @Rename Series01 Test

In the excel file I also have data in columns B and C, and with this command this data are also imported to EViews. Is this a bug? Or can I not import only one cell from Excel to EViews?

Best regards,
Pelle

EViews Steve
EViews Developer
Posts: 572
Joined: Tue Sep 16, 2008 3:00 pm
Location: Irvine, CA

Re: Import only one cell from Excel

Postby EViews Steve » Tue Oct 11, 2016 8:50 am

By default, if you specify a single cell during an import, EViews tries to expand it to include all cells with data to the right and below that point. We can't easily change that as many users depend on that functionality for automatically determining data ranges in an unknown source spreadsheet.

But, you can always tell EViews you only want to keep certain columns by using @keep, like this:

Code: Select all

import C:\Temp\Data.xlsx Range="Tmp!A2:A2" @Freq M 2016M09 @Rename Series01 Test @keep Series01


Steve

pelleenglund
Posts: 19
Joined: Fri Sep 16, 2016 6:35 am

Re: Import only one cell from Excel

Postby pelleenglund » Thu Oct 13, 2016 6:56 am

That's right, forgot that. Thanks!


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest