<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543</link>
    <title>MATLAB Central Newsreader - xlswrite to Excel 2007 problem</title>
    <description>Feed for thread: xlswrite to Excel 2007 problem</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 04 Sep 2008 17:08:02 -0400</pubDate>
      <title>xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598725</link>
      <author>Michael Lenz</author>
      <description>Hello All - &lt;br&gt;
&lt;br&gt;
I've got a function that utilizes xlswrite to spit out some &lt;br&gt;
summary data to xls sheets for quick review; a function &lt;br&gt;
that I've been using for several months.  Recently, I &lt;br&gt;
installed Office 2007 and am now running into problems with &lt;br&gt;
people running Excel 2003 not being able to open the xls &lt;br&gt;
files I've written. &lt;br&gt;
&lt;br&gt;
I've made no changes to the function since I last used &lt;br&gt;
Excel 2003 and the output files are being saved with &lt;br&gt;
the .xls extension. The files open fine with Excel 2007, &lt;br&gt;
but when I try with Excel 2003 I get a warning message that &lt;br&gt;
says the file is in an unrecognizable format.  When I &lt;br&gt;
proceed to open the file, it is a mess of miscellaneous &lt;br&gt;
characters. &lt;br&gt;
&lt;br&gt;
Any ideas or suggestions?&lt;br&gt;
&lt;br&gt;
Thanks!</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 18:29:19 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598737</link>
      <author>otto</author>
      <description>Go back to Excel 2003!  I've been resisting the upgrade for years.&lt;br&gt;
&lt;br&gt;
Not sure right now - I haven't used xlswrite in a number of years, but&lt;br&gt;
always remember that it was finicky when I did.  Sometimes when&lt;br&gt;
Outlook checked email it would break the connection between Matlab and&lt;br&gt;
Excel.  I think your problem is due to the way Matlab interfaces with&lt;br&gt;
Excel in xlswrite.m in that it starts a COM connection with whatever&lt;br&gt;
version of Excel that's on your machine and generates the output file&lt;br&gt;
by sending commands to Excel through the COM interface.  So even&lt;br&gt;
though you don't directly see the XLS file you're generating it with&lt;br&gt;
your incompatible version of Excel.&lt;br&gt;
&lt;br&gt;
I would suggest looking into the compatibility options in your version&lt;br&gt;
of Excel (probably really deep in there) to see if there's a way to&lt;br&gt;
always save in a backwards compatible format or run extra checks&lt;br&gt;
everytime it saves a file.  If that fails you you can always write the&lt;br&gt;
data to a CSV file for quick sharing if people don't have a lot of&lt;br&gt;
hangups with format...  The CSV will open with the least complications&lt;br&gt;
in any version of Excel.&lt;br&gt;
&lt;br&gt;
Cheers,&lt;br&gt;
Otto&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
On Sep 4, 1:08=A0pm, &quot;Michael Lenz&quot; &amp;lt;mcl...@sandia.gov&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hello All -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I've got a function that utilizes xlswrite to spit out some&lt;br&gt;
&amp;gt; summary data to xls sheets for quick review; a function&lt;br&gt;
&amp;gt; that I've been using for several months. =A0Recently, I&lt;br&gt;
&amp;gt; installed Office 2007 and am now running into problems with&lt;br&gt;
&amp;gt; people running Excel 2003 not being able to open the xls&lt;br&gt;
&amp;gt; files I've written.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I've made no changes to the function since I last used&lt;br&gt;
&amp;gt; Excel 2003 and the output files are being saved with&lt;br&gt;
&amp;gt; the .xls extension. The files open fine with Excel 2007,&lt;br&gt;
&amp;gt; but when I try with Excel 2003 I get a warning message that&lt;br&gt;
&amp;gt; says the file is in an unrecognizable format. =A0When I&lt;br&gt;
&amp;gt; proceed to open the file, it is a mess of miscellaneous&lt;br&gt;
&amp;gt; characters.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Any ideas or suggestions?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks!</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 18:32:03 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598739</link>
      <author>Michael Lenz</author>
      <description>A little more detail:&lt;br&gt;
&lt;br&gt;
I think I can get around the problem if I can get xlswrite &lt;br&gt;
to invoke Excel 2003 rather than 2007.  To do this I need &lt;br&gt;
the programmatic identifier (progid) to feed to the command&lt;br&gt;
Excel = actxserver('Excel.Application').  The trouble is &lt;br&gt;
that, from what I've uncovered is that both Excel 2003 and &lt;br&gt;
2007 use Excel.Application as their progid.  Does anyone &lt;br&gt;
happen to know how I can change the progid of Excel 2003 to &lt;br&gt;
see if that works?  Perhaps I can get 2003 to be invoked if &lt;br&gt;
I knew what the interface name for Excel 2003 (from Office &lt;br&gt;
11) is.&lt;br&gt;
&lt;br&gt;
Thanks.&lt;br&gt;
M Lenz</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 18:42:13 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598744</link>
      <author>Bill August</author>
      <description>&amp;gt; Hello All - &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I've got a function that utilizes xlswrite to spit&lt;br&gt;
&amp;gt; out some &lt;br&gt;
&amp;gt; summary data to xls sheets for quick review; a&lt;br&gt;
&amp;gt; function &lt;br&gt;
&amp;gt; that I've been using for several months.  Recently, I&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; installed Office 2007 and am now running into&lt;br&gt;
&amp;gt; problems with &lt;br&gt;
&amp;gt; people running Excel 2003 not being able to open the&lt;br&gt;
&amp;gt; xls &lt;br&gt;
&amp;gt; files I've written. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I've made no changes to the function since I last&lt;br&gt;
&amp;gt; used &lt;br&gt;
&amp;gt; Excel 2003 and the output files are being saved with &lt;br&gt;
&amp;gt; the .xls extension. The files open fine with Excel&lt;br&gt;
&amp;gt; 2007, &lt;br&gt;
&amp;gt; but when I try with Excel 2003 I get a warning&lt;br&gt;
&amp;gt; message that &lt;br&gt;
&amp;gt; says the file is in an unrecognizable format.  When I&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; proceed to open the file, it is a mess of&lt;br&gt;
&amp;gt; miscellaneous &lt;br&gt;
&amp;gt; characters. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Any ideas or suggestions?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks!&lt;br&gt;
&amp;gt; &lt;br&gt;
Hi,&lt;br&gt;
xlwrite do not support customize format. So although you give the file extension as '.xls'. IT will still use 2007 format.&lt;br&gt;
One way without modify xlswrite is, run these lines first:&lt;br&gt;
Excel = actxserver('excel.application');&lt;br&gt;
set(Excel, 'DefaultSaveFormat', 'xlExcel9795') ;&lt;br&gt;
Excel.Quit ;&lt;br&gt;
Otherwise you have to modify the xlswrite.&lt;br&gt;
Regards.</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 19:11:02 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598753</link>
      <author>Michael Lenz</author>
      <description>&amp;gt; Hi,&lt;br&gt;
&amp;gt; xlwrite do not support customize format. So although you &lt;br&gt;
give the file extension as '.xls'. IT will still use 2007 &lt;br&gt;
format.&lt;br&gt;
&amp;gt; One way without modify xlswrite is, run these lines first:&lt;br&gt;
&amp;gt; Excel = actxserver('excel.application');&lt;br&gt;
&amp;gt; set(Excel, 'DefaultSaveFormat', 'xlExcel9795') ;&lt;br&gt;
&amp;gt; Excel.Quit ;&lt;br&gt;
&amp;gt; Otherwise you have to modify the xlswrite.&lt;br&gt;
&amp;gt; Regards.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanks Bill. I've tried this and get the following error:&lt;br&gt;
???Error: Object returned error code: 0x800A03EC&lt;br&gt;
&lt;br&gt;
that looks like some kind of Excel limitation. Even using &lt;br&gt;
the inspector window in MATLAB, if I try changing to &lt;br&gt;
xlExcel9795, the change won't take effect.</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 19:37:01 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598754</link>
      <author>Michael Lenz</author>
      <description>Okay, here's something else...&lt;br&gt;
&lt;br&gt;
It has to be a save format issue. I right-click the file &lt;br&gt;
spat out by xlswrite to do Save As and Windows insists that &lt;br&gt;
the file is a .xlsx file. If I open and Save As a .xls with &lt;br&gt;
Excel 2007, the file opens just fine in Excel 2003.</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 21:09:12 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598762</link>
      <author>Bill August</author>
      <description>&amp;gt; A little more detail:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I think I can get around the problem if I can get&lt;br&gt;
&amp;gt; xlswrite &lt;br&gt;
&amp;gt; to invoke Excel 2003 rather than 2007.  To do this I&lt;br&gt;
&amp;gt; need &lt;br&gt;
&amp;gt; the programmatic identifier (progid) to feed to the&lt;br&gt;
&amp;gt; command&lt;br&gt;
&amp;gt; Excel = actxserver('Excel.Application').  The trouble&lt;br&gt;
&amp;gt; is &lt;br&gt;
&amp;gt; that, from what I've uncovered is that both Excel&lt;br&gt;
&amp;gt; 2003 and &lt;br&gt;
&amp;gt; 2007 use Excel.Application as their progid.  Does&lt;br&gt;
&amp;gt; anyone &lt;br&gt;
&amp;gt; happen to know how I can change the progid of Excel&lt;br&gt;
&amp;gt; 2003 to &lt;br&gt;
&amp;gt; see if that works?  Perhaps I can get 2003 to be&lt;br&gt;
&amp;gt; invoked if &lt;br&gt;
&amp;gt; I knew what the interface name for Excel 2003 (from&lt;br&gt;
&amp;gt; Office &lt;br&gt;
&amp;gt; 11) is.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks.&lt;br&gt;
&amp;gt; M Lenz&lt;br&gt;
Hi&lt;br&gt;
It is quite easy to solve.&lt;br&gt;
Just some different between 03 and 07. &lt;br&gt;
Try this,&lt;br&gt;
set(Excel, 'DefaultSaveFormat', 'xlExcel8') &lt;br&gt;
Regards.&lt;br&gt;
Also you can set it in Excel 2007. It is in file-&amp;gt;excel option-&amp;gt;save option card.&lt;br&gt;
Hope this can help.</description>
    </item>
    <item>
      <pubDate>Thu, 04 Sep 2008 22:57:02 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598771</link>
      <author>Michael Lenz</author>
      <description>&amp;gt; Hi&lt;br&gt;
&amp;gt; It is quite easy to solve.&lt;br&gt;
&amp;gt; Just some different between 03 and 07. &lt;br&gt;
&amp;gt; Try this,&lt;br&gt;
&amp;gt; set(Excel, 'DefaultSaveFormat', 'xlExcel8') &lt;br&gt;
&amp;gt; Regards.&lt;br&gt;
&amp;gt; Also you can set it in Excel 2007. It is in file-&amp;gt;excel &lt;br&gt;
option-&amp;gt;save option card.&lt;br&gt;
&amp;gt; Hope this can help.&lt;br&gt;
&lt;br&gt;
Bill, thanks for the suggestions.  I tried changing to &lt;br&gt;
xlExcel8 in the inspector window to no avail.  I'll give it &lt;br&gt;
another shot using the set command to see what happens.&lt;br&gt;
&lt;br&gt;
I have noticed that even when I open the files with Excel &lt;br&gt;
2007 I'm asked if I want to continue because the file is a &lt;br&gt;
different format than the .xls extension. &lt;br&gt;
&lt;br&gt;
Silly problem I know, but it is driving me crazy because it &lt;br&gt;
should have a simple solution.&lt;br&gt;
&lt;br&gt;
Thanks again!</description>
    </item>
    <item>
      <pubDate>Fri, 05 Sep 2008 01:46:02 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598780</link>
      <author>Philosophaie </author>
      <description>You have to initialize the Workbook and Worksheet&lt;br&gt;
&lt;br&gt;
function ExcelFn&lt;br&gt;
exl = actxserver('excel.application');&lt;br&gt;
exlWkbk = exl.Workbooks;&lt;br&gt;
exlFile = exlWkbk.Open&lt;br&gt;
(['C:\folder\file']);&lt;br&gt;
exlSheet1 = exlFile.Sheets.Item('Sheet1');&lt;br&gt;
input=exlSheet1.Range('B3');&lt;br&gt;
&lt;br&gt;
...Matlab formulas...&lt;br&gt;
&lt;br&gt;
exlSheet1.Range('C3')=output;&lt;br&gt;
exlWkbk.Close&lt;br&gt;
exl.Quit&lt;br&gt;
end</description>
    </item>
    <item>
      <pubDate>Fri, 05 Sep 2008 17:46:03 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#598929</link>
      <author>Michael Lenz</author>
      <description>Thanks, but xlswrite does initialize the workbook, worksheet and other tasks necessary to write to Excel. &lt;br&gt;
&lt;br&gt;
I have determined that regardless of what DefaultSaveFormat is set to, the result of running xlswrite is a file in the .xlsx format. Thus far, the only solution is to go back, open the new file with Excel 2007 and using Save As to make the file into a .xls by selecting 97-2003 format. &lt;br&gt;
&lt;br&gt;
In Excel 2007 I have gone to Excel Options&amp;gt;&amp;gt;Save&amp;gt;&amp;gt;Save files in this format: and select Excel 97-2003 Workbook (.xls) prior to running xlswrite; this doesn't work either. The funny thing is that if I open Excel 2007, make a workbook and save it (with the Excel save option selected above), it opens just fine in 2003.  &lt;br&gt;
&lt;br&gt;
It seems as if xlswrite uses the default save format of the latest version of Excel (.xlsx), regardless of what I set DefaultSaveFormat to be with MATLAB. &lt;br&gt;
&lt;br&gt;
My next guess is to open and save a 'template', empty, workbook in Excel 2003 and modify xlswrite to go open this template.xls file, add my data, then save with a new file name.  I have some PPT functions that do this and they work just fine regardless of the version of Office. &lt;br&gt;
&lt;br&gt;
Anyway, this has been driving me crazy, so I wanted to provide an update for anyone else that might encounter version issues with Excel. &lt;br&gt;
&lt;br&gt;
The ridiculous part is that if Excel 2003 and 2007 had different progid names to pass to the actxserver(progid) function, this whole issue could be avoided.  Unfortunately, both 2003 and 2007 have the progid 'Excel' and I haven't found a way to change that.&lt;br&gt;
&lt;br&gt;
M LENZ</description>
    </item>
    <item>
      <pubDate>Mon, 08 Sep 2008 03:54:01 -0400</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#599192</link>
      <author>Michael Lenz</author>
      <description>Final note:&lt;br&gt;
&lt;br&gt;
I finally had to resort to a small modification to xlswrite.  I opened a blank workbook with Excel 2003, then saved it as &quot;XLTemplateFile.xls&quot;.  The modification to xlswrite now opens this template file, then sets up the workbook, and saves the .xls template using the input file name - just like xlswrite.  Here is the small mod I made, just as an FYI (starts at line 207 in xlswrite):&lt;br&gt;
&lt;br&gt;
try&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bCreated = false;&lt;br&gt;
&amp;nbsp;%   if ~exist(file,'file')&lt;br&gt;
&amp;nbsp;%       % Create new workbook.  &lt;br&gt;
&amp;nbsp;%       bCreated = true;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%This is in place because in the presence of a Google Desktop&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%Search installation, calling Add, and then SaveAs after adding data,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%to create a new Excel file, will leave an Excel process hanging.  &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%This workaround prevents it from happening, by creating a blank file,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%and saving it.  It can then be opened with Open.&lt;br&gt;
&amp;nbsp;%       ExcelWorkbook = Excel.workbooks.Add;&lt;br&gt;
&amp;nbsp;%       ExcelWorkbook.SaveAs(file)&lt;br&gt;
&amp;nbsp;%       ExcelWorkbook.Close(false);&lt;br&gt;
&amp;nbsp;%   end&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;%Open file&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExcelWorkbook = Excel.workbooks.Open(XLTemplateFile);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExcelWorkbook = Excel.workbooks.Add;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExcelWorkbook.SaveAs(file)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bCreated = true;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExcelWorkbook.Close(false);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ExcelWorkbook = Excel.workbooks.Open(file);&lt;br&gt;
&lt;br&gt;
Anyway, just wanted to pass that along in the event that anyone else runs into the same issue that I did.&lt;br&gt;
&lt;br&gt;
Thanks to everyone that posted suggestions on this thread.&lt;br&gt;
&lt;br&gt;
M Lenz</description>
    </item>
    <item>
      <pubDate>Thu, 06 Nov 2008 22:02:02 -0500</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#609470</link>
      <author>Dan Haeg</author>
      <description>&quot;Michael Lenz&quot; &amp;lt;mclenz@sandia.gov&amp;gt; wrote in message &amp;lt;ga27kp$e4l$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Final note:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I finally had to resort to a small modification to xlswrite.  I opened a blank workbook with Excel 2003, then saved it as &quot;XLTemplateFile.xls&quot;.  The modification to xlswrite now opens this template file, then sets up the workbook, and saves the .xls template using the input file name - just like xlswrite.  Here is the small mod I made, just as an FYI (starts at line 207 in xlswrite):&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; try&lt;br&gt;
&amp;gt;     bCreated = false;&lt;br&gt;
&amp;gt;  %   if ~exist(file,'file')&lt;br&gt;
&amp;gt;  %       % Create new workbook.  &lt;br&gt;
&amp;gt;  %       bCreated = true;&lt;br&gt;
&amp;gt;         %This is in place because in the presence of a Google Desktop&lt;br&gt;
&amp;gt;         %Search installation, calling Add, and then SaveAs after adding data,&lt;br&gt;
&amp;gt;         %to create a new Excel file, will leave an Excel process hanging.  &lt;br&gt;
&amp;gt;         %This workaround prevents it from happening, by creating a blank file,&lt;br&gt;
&amp;gt;         %and saving it.  It can then be opened with Open.&lt;br&gt;
&amp;gt;  %       ExcelWorkbook = Excel.workbooks.Add;&lt;br&gt;
&amp;gt;  %       ExcelWorkbook.SaveAs(file)&lt;br&gt;
&amp;gt;  %       ExcelWorkbook.Close(false);&lt;br&gt;
&amp;gt;  %   end&lt;br&gt;
&amp;gt;     &lt;br&gt;
&amp;gt;     %Open file&lt;br&gt;
&amp;gt;     ExcelWorkbook = Excel.workbooks.Open(XLTemplateFile);&lt;br&gt;
&amp;gt;     ExcelWorkbook = Excel.workbooks.Add;&lt;br&gt;
&amp;gt;     ExcelWorkbook.SaveAs(file)&lt;br&gt;
&amp;gt;     bCreated = true;&lt;br&gt;
&amp;gt;     ExcelWorkbook.Close(false);&lt;br&gt;
&amp;gt;     ExcelWorkbook = Excel.workbooks.Open(file);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Anyway, just wanted to pass that along in the event that anyone else runs into the same issue that I did.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks to everyone that posted suggestions on this thread.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; M Lenz&lt;br&gt;
&lt;br&gt;
I had a simmilar problem with xlswrite. This seems to work outside of xlswrite:&lt;br&gt;
ExcelWorkbook.SaveAs(file,39)&lt;br&gt;
&lt;br&gt;
39 saves it to excel95 format&lt;br&gt;
-4143 saves it to excel's default format, which i used to convert csv files to xls silently&lt;br&gt;
&lt;br&gt;
here is a list of possible values I found:&lt;br&gt;
&lt;a href=&quot;http://www.pcreview.co.uk/forums/thread-3042211.php&quot;&gt;http://www.pcreview.co.uk/forums/thread-3042211.php&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
explained poorly here:&lt;br&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.xlfileformat(VS.80).aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.xlfileformat(VS.80).aspx&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Dan</description>
    </item>
    <item>
      <pubDate>Mon, 21 Dec 2009 13:18:04 -0500</pubDate>
      <title>Re: xlswrite to Excel 2007 problem</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/235543#703718</link>
      <author>Shai Carmi</author>
      <description>Thank you very much. This is working for me- I simply replaced line 218 of the file xlswrite.m with:&lt;br&gt;
ExcelWorkbook.SaveAs(file,39)&lt;br&gt;
and I could read the saved Excel files in Excel 2007 without warning messages. The file was also read in Macintosh without any problem.</description>
    </item>
  </channel>
</rss>

