Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!g19g2000yqo.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: xlswrite
Date: Fri, 16 Oct 2009 09:50:19 -0700 (PDT)
Organization: http://groups.google.com
Lines: 19
Message-ID: <f0d98438-296c-47b3-8cd6-816ed4793edb@g19g2000yqo.googlegroups.com>
References: <hb6s4f$evt$1@fred.mathworks.com> <hb7104$dus$1@fred.mathworks.com> 
	<ab7ac5a4-ce85-4e7d-8da5-b77e9c30f4db@k17g2000yqb.googlegroups.com> 
	<hba6pg$cah$1@fred.mathworks.com>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
X-Trace: posting.google.com 1255711819 13227 127.0.0.1 (16 Oct 2009 16:50:19 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 16 Oct 2009 16:50:19 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g19g2000yqo.googlegroups.com; posting-host=192.44.136.113; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 
	CyberSafe-IWA-Enable; .NET CLR 1.1.4322; .NET CLR 2.0.50727; MS-RTC LM 8; 
	.NET CLR 3.0.04506.648; .NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:577897


I read your messag again and you said "be in a unique file also in a
unique sheet."  So I gave you code to do that.  You have unique files
because it's inside the for loop.  The only way to have unique sheets
(within a single workbook) is to give them different worksheet names.
However if the worksheets are in different workbooks (files) then you
can of course use the same worksheet name.

But now it appears that perhaps what you really mean is to have a
common Excel file (not separate unique ones), and to put all the
various arrays that you calculate/generate in your loop into one
common file.  Your code does that but the problem with it is that it
puts all your arrays m into the same location.  I'd recommend
calculating a cell reference each pass through your loop, and passing
that in so at least they all get poked into different cells (row/
columns) in the worksheet and don't just keep overwriting the same
location every time.

Again, this is very slow and you'd be better off using xlswrite1().