Page 1 of 1

import from xlsx worksheet

Posted: Tue May 08, 2012 7:48 am
by robconsip
I'm trying to import data from single cells of Excel 2007/2010 worksheets using, for example, the following syntax:

import Mysheet.xlsx range="Myrange!H35:H35" @freq a 2010 @rename series01 myseries

Unfortunately specifying only the top left cell (H35) the import range is automatically extended to the other non-empty cells adjacent to the H35.
This seems to be a specifice feature of the "range" option.

I wonder if it's possible to specify the range option in an alternative way or if exists a workaround in order to read single cells.

Thank you very much for your help,
Roberto

Re: import from xlsx worksheet

Posted: Wed May 09, 2012 4:22 pm
by EViews Chris
You're right. We're not distinguishing between a single cell and a range with the start and end being the same cell.

Here's a way that I think you can do what you want. Read two columns, then toss out the second one:

import Mysheet.xlsx range="Myrange!H35:I35" @freq a 2010 @keep series01 @rename series01 myseries

(I admit this seems kind of awkward, but changing the current behaviour would require some serious thought).