| MATLAB Central > MATLAB Newsreader > More details -- actxserver('excel.application') |
|
|
|
Subject: More details -- actxserver('excel.application') From: Andy Eisenberg Date: 2 Jul, 2009 18:31:02 Message: 1 of 8 |
|
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: |
|
Subject: More details -- actxserver('excel.application') From: ImageAnalyst Date: 2 Jul, 2009 19:16:18 Message: 2 of 8 |
|
On Jul 2, 2:31 pm, "Andy Eisenberg" <theorigam...@gmail.com> wrote: |
|
Subject: More details -- actxserver('excel.application') From: Steven Lord Date: 2 Jul, 2009 19:22:25 Message: 3 of 8 |
|
|
|
Subject: More details -- actxserver('excel.application') From: Andy Eisenberg Date: 2 Jul, 2009 19:48:01 Message: 4 of 8 |
|
Thanks for the help. I'll get started reading through the developer reference. |
|
Subject: More details -- actxserver('excel.application') From: Andy Eisenberg Date: 6 Jul, 2009 17:58:02 Message: 5 of 8 |
|
I'm going to need a little more help with this. I'm writing a GUI that should allow the user to enter Excel formulas and add new columns to a spreadsheet whose values are the result of those formulas. For the purpose of testing, I have a spreadsheet with one column with 50 rows containing the numbers 1 through 50. I would like the B column to be 5 times the A column. I can do this in less-than-elegant ways, such as: |
|
Subject: More details -- actxserver('excel.application') From: Ilya Rozenfeld Date: 6 Jul, 2009 18:29:02 Message: 6 of 8 |
|
To get the right formulas you need to create a cell array of strings or use loop |
|
Subject: More details -- actxserver('excel.application') From: Andy Eisenberg Date: 6 Jul, 2009 20:01:05 Message: 7 of 8 |
|
Yeah, that works. But I was hoping to avoid looping in favor of a vectorized method. In this case, there's no point trying to work around this in MATLAB. It's far simpler to just do this in Excel (that is what it was made for after all), and then pull the resulting data into MATLAB. |
|
Subject: More details -- actxserver('excel.application') From: Ilya Rozenfeld Date: 7 Jul, 2009 13:24:01 Message: 8 of 8 |
|
There is nothing wrong with using loops. But if you like here is vectorized version |
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.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| excel | Andy | 2 Jul, 2009 14:36:57 |
| actxserver | Andy | 2 Jul, 2009 14:36:57 |
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.
Contact us at files@mathworks.com