Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to Select Entire Row From Excel File Uisng Prompt?
Date: Mon, 19 Nov 2012 13:23:07 +0000 (UTC)
Organization: HSBC
Lines: 25
Message-ID: <k8dbrr$7d3$1@newscl01ah.mathworks.com>
References: <k899g1$cb2$1@newscl01ah.mathworks.com> <k8b90m$4g8$1@newscl01ah.mathworks.com> <k8bt7h$8r3$1@newscl01ah.mathworks.com> <k8c9se$iqk$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1353331387 7587 172.30.248.35 (19 Nov 2012 13:23:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 19 Nov 2012 13:23:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2921053
Xref: news.mathworks.com comp.soft-sys.matlab:783078

Well, I'm entering a value (date) into the InputBox, and then reading from the InputBox to ColumnA.  You're correct.  I didn't phrase it as well as I could have.

I believe both the options that you mentioned would work fine.  I'm not sure how to do the coding.  Surely, you know Matlab better than I know it.

I never got your code sample to work.  It said something about the Try Catch being incorrect.  It looks fine to me.  I didn't know how to interpret that error.

Do you have an idea what the actual code will look like?  If not, I'll have to do a lot more fiddling with this thing.  I spent a while on it yesterday, and got as far as my last post.

Thanks!!


"Phil Goddard" <phil@goddardconsulting.ca> wrote in message <k8c9se$iqk$1@newscl01ah.mathworks.com>...
> I'm confused by your terminology.
> I don't see anywhere in your code (or any reason in your description) why you are "... pass that into ColumA ..."
> Nor "(this is what I pass to the InputBox)" -- surely you are reading from the InputBox not passing anything into it.
> 
> If you mean that you are just wanting to compare a number(date?) that a user enters to the values(dates) in the first column of the spreadsheet and then extract the corresponding row, then why not either,
> 
> a) read the first column into MATLAB; determine which element (and hence row) corresponds to the value entered by the user; then use my previous code to read the specified row.
> 
> or
> 
> b) read everything from the specified sheet into MATLAB; then determine which row you want and extract it from the whole matrix that was read in.
> 
> Phil.