Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!l31g2000yqb.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: More details -- actxserver('excel.application')
Date: Thu, 2 Jul 2009 12:16:18 -0700 (PDT)
Organization: http://groups.google.com
Lines: 53
Message-ID: <9fef7e47-a5b2-4114-a403-ea7fdf72de28@l31g2000yqb.googlegroups.com>
References: <h2iud6$c94$1@fred.mathworks.com>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1246562178 31099 127.0.0.1 (2 Jul 2009 19:16:18 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 2 Jul 2009 19:16:18 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: l31g2000yqb.googlegroups.com; posting-host=192.44.136.113; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 
	GTB6; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 
	3.5.21022),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
Xref: news.mathworks.com comp.soft-sys.matlab:552507


On Jul 2, 2:31 pm, "Andy Eisenberg" <theorigam...@gmail.com> wrote:
> I'm trying to write a GUI in MATLAB that should have the ability to read from and write to an Excel spreadsheet arbitrarily.  (By that I mean, given a range in a spreadsheet, I should be able to load the data into MATLAB from the spreadsheet.  Or, given a range and an array that fits the range, I should be able to write that array to that range.)  The problem I'm having is one of documentation.  The MATLAB online documentation goes as far as establishing the connection between MATLAB and Excel, namely:
>
> e = actxserver ('Excel.Application')
> e.Visible = 1;
> eWorkbooks = e.Workbooks
> w = eWorkbooks.Add
> e.Quit;
> e.delete;
>
> Elsewhere I've found things like:
>
> exl = actxserver('excel.application');
> exlWkbk = exl.Workbooks;
> exlFile = exlWkbk.Open([docroot '/techdoc/matlab_external/examples/input_resp_data.xls']);
> exlSheet1 = exlFile.Sheets.Item('Sheet1');
> robj = exlSheet1.Columns.End(4);
> numrows = robj.row;
> dat_range = ['A1:G' num2str(numrows)];
> rngObj = exlSheet1.Range(dat_range);
> exlData = rngObj.Value;
> exl.registerevent({'WorkbookBeforeClose',@close_event1});
>
> But I only sort of understand this code because I can't find documentation for the methods/properties anywhere.  The expression exlSheet1.Columns.End(4) does the right thing, but I don't know why.
>
> Is there somewhere where I can find more complete documentation on the Excel objects, including documentation on their methods, properties, and common usage?  I am not against Reading The Fantastic Manuals, if only I could find them.
>
> Thanks in advance for your help.

-----------------------------------------------------------------------------------------------------------------------------
Andy:
Here's the Excel 2007 Developer Reference
http://msdn.microsoft.com/en-us/library/bb242656.aspx

It came from the "Learn" tab of the Microsoft Office Developer Center
http://msdn.microsoft.com/en-us/office/default.aspx

There's a boatload of stuff there, but it's a place to start.
Good luck,
ImageAnalyst