Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!g1g2000pra.googlegroups.com!not-for-mail
From: NZTideMan <mulgor@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: write2excel
Date: Thu, 29 Oct 2009 12:04:54 -0700 (PDT)
Organization: http://groups.google.com
Lines: 15
Message-ID: <bd524be5-63c1-49bb-9d1c-36353fe99708@g1g2000pra.googlegroups.com>
References: <hccafs$9e1$1@fred.mathworks.com>
NNTP-Posting-Host: 202.78.152.105
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1256843094 21597 127.0.0.1 (29 Oct 2009 19:04:54 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 29 Oct 2009 19:04:54 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g1g2000pra.googlegroups.com; posting-host=202.78.152.105; 
	posting-account=qPexFwkAAABOl8VUndE6Jm-9Z5z_fSpR
User-Agent: G2/1.0
X-HTTP-Via: 1.1 bc1
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:581115


On Oct 30, 3:57 am, "Teodor " <teodoralexan...@yahoo.com> wrote:
> Hello,
> I have a textbox and a button. When I write a number into the textbox and push the button, I want to save that value into an excel file.
> Till this point it is simple, but when I want to write a new value into that box and push again the button to save the new value into the excel file, this new value it will overwrite the old one. I want to put the new value in the next row, below the old value in the excel file.
> Can enyone help me with this problem?

The way I'd do it is to use the facility in xlswrite to name the cell
you want to place the data in.  If you want the data to go into column
A, you would define an index indx=0, then do this:
indx=indx+1;
xlswrite(xlsfile,data,sheet,['A' num2str(indx)])