Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!news.aset.psu.edu!support1.mathforum.org!not-for-mail
From: Bill August <hui.song@beds.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: xlswrite to Excel 2007 problem
Date: Thu, 04 Sep 2008 14:42:13 EDT
Organization: The Math Forum
Lines: 39
Message-ID: <8625406.1220553764085.JavaMail.jakarta@nitrogen.mathforum.org>
References: <g9p4li$7qd$1@fred.mathworks.com>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1-1.mathforum.org 1220553764 9597 144.118.30.135 (4 Sep 2008 18:42:44 GMT)
X-Complaints-To: news@support1-1.mathforum.org
NNTP-Posting-Date: Thu, 4 Sep 2008 18:42:44 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:488645



> Hello All - 
> 
> I've got a function that utilizes xlswrite to spit
> out some 
> summary data to xls sheets for quick review; a
> function 
> that I've been using for several months.  Recently, I
> 
> installed Office 2007 and am now running into
> problems with 
> people running Excel 2003 not being able to open the
> xls 
> files I've written. 
> 
> I've made no changes to the function since I last
> used 
> Excel 2003 and the output files are being saved with 
> the .xls extension. The files open fine with Excel
> 2007, 
> but when I try with Excel 2003 I get a warning
> message that 
> says the file is in an unrecognizable format.  When I
> 
> proceed to open the file, it is a mess of
> miscellaneous 
> characters. 
> 
> Any ideas or suggestions?
> 
> Thanks!
> 
Hi,
xlwrite do not support customize format. So although you give the file extension as '.xls'. IT will still use 2007 format.
One way without modify xlswrite is, run these lines first:
Excel = actxserver('excel.application');
set(Excel, 'DefaultSaveFormat', 'xlExcel9795') ;
Excel.Quit ;
Otherwise you have to modify the xlswrite.
Regards.