Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: More details -- actxserver('excel.application')
Date: Thu, 2 Jul 2009 18:31:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 28
Message-ID: <h2iud6$c94$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246559462 12580 172.30.248.38 (2 Jul 2009 18:31:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 2 Jul 2009 18:31:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1895050
Xref: news.mathworks.com comp.soft-sys.matlab:552486


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.