Thread Subject:
Matlab as COM client: How to ID object members

Subject: Matlab as COM client: How to ID object members

From: Paul

Date: 25 May, 2012 20:21:29

Message: 1 of 1

I am using the following toy code to figure out how to access my Excel
data:

   wbkNmRatings = 'Book1';
   xlApp=actxGetRunningServer('Excel.Application');
   wbks=xlApp.Workbooks;
   wbk = wbks.Item(wbkNmRatings);
   sht=wbk.Sheets.Item('mySheet');
   rg=sht.Range('$B$2:$C$3');

   rg.Value
   rg.Formula

   methodsview(rg)
   inspect(rg)

One inconsistency between the objects here versus those accessed from
the Excel immediate window is that you can take the Value and Formula
of properties of an entire range, whereas you can only do that for
individual cells in Excel. I tried to look at the methods &
properties of the range handle "rg" to see what else could be done, as
well as what whether there was a way to access specific cells or
subranges in "rg". However, "inspect" and "methodsview" does not
reveal either a Value or Formula property or method. Why would they
not be listed, and where would I find more complete documentation?

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us