Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Saving figures to Excel

Subject: Saving figures to Excel

From: Anthony

Date: 17 Sep, 2007 20:38:40

Message: 1 of 4

Is there a feature in MATLAB that will allow me to save a
figure to an Excel sheet, just like xlswrite where I give
it a cell to save it to

Subject: Saving figures to Excel

From: Yair Altman

Date: 17 Sep, 2007 20:55:31

Message: 2 of 4

"Anthony " <anthony.campos@baesystems.com> wrote in message
<fcmokg$n4l$1@fred.mathworks.com>...
> Is there a feature in MATLAB that will allow me to save a
> figure to an Excel sheet, just like xlswrite where I give
> it a cell to save it to

Use OfficeDoc on the file Exchange:
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15192

Yair Altman
http://ymasoftware.com

Subject: Saving figures to Excel

From: Anthony

Date: 18 Sep, 2007 13:53:34

Message: 3 of 4

I tried the officedoc command
[file,status,errMsg] = officedoc
('tx_compare_rates.xls', 'open', 'mode','append');
status = officedoc(file,'write',rate2,'H1:P23',
[figsavemag '.fig']);

 and received the following error:
??? Error setting officedoc property '6 MHz':
Invalid field name: '6 mhz'.

Error in ==> tx_compare_rates at 135
status = officedoc(file,'write',rate2,'H1:P23',
[figsavemag '.fig']);

I want to write a bitmap or the .fig file to the H1 cell,
to the rate2 sheet, where rate2 = '6 Mhz', and file









"Anthony " <anthony.campos@baesystems.com> wrote in message
<fcmokg$n4l$1@fred.mathworks.com>...
> Is there a feature in MATLAB that will allow me to save a
> figure to an Excel sheet, just like xlswrite where I give
> it a cell to save it to

Subject: Saving figures to Excel

From: Yair Altman

Date: 18 Sep, 2007 18:47:26

Message: 4 of 4

> status = officedoc(file,'write',rate2,'H1:P23',[figsavemag
'.fig']);
>
> and received the following error:
> ??? Error setting officedoc property '6 MHz':
> Invalid field name: '6 mhz'.

Following 'write', you need to specify properties in
name-value (P-V) pairs. In your case:

status=officedoc(file,'write','sheet',rate2,'range','H1:P23','image',myImage);

the supplied myImage parameter may be an image filename or a
handle to a Matlab figure.

Yair Altman
http://ymasoftware.com

Tags for this Thread

Everyone's Tags:

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.

Tag Activity for This Thread
Tag Applied By Date/Time
excel write matlab figure Anthony 18 Sep, 2007 09:55:13
save figure excel Anthony 17 Sep, 2007 16:40:20
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
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 Disclaimer prior to use.
Related Topics