Path: news.mathworks.com!not-for-mail
From: "Shanmugam Kannappan" <shanmugambe@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Writing variable name and value from matlab workspace
Date: Wed, 1 Oct 2008 05:46:01 +0000 (UTC)
Organization: NFIndia
Lines: 18
Message-ID: <gbv2qp$fod$1@fred.mathworks.com>
References: <gbsh1c$luc$1@fred.mathworks.com>
Reply-To: "Shanmugam Kannappan" <shanmugambe@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1222839961 16141 172.30.248.38 (1 Oct 2008 05:46:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 1 Oct 2008 05:46:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1441885
Xref: news.mathworks.com comp.soft-sys.matlab:493052


Hello,
try this,

I think this will work for u.


var1=20;
xlswrite('X1.xlsx',[{'var1'};var1])

Shan...

"SURESH " <sureshkumarg@infotechsw.com> wrote in message <gbsh1c$luc$1@fred.mathworks.com>...
> Hello Frineds,
> 
> In brief, is it possible to write the variable name and its value from the matlab workspace to an excel file. I know that using &#8220;xlswrite&#8221; command, we can write the values from the workspace to an excel file. But I would like to know whether I can write the variable name as well.
> 
> Thanks,
> Suresh.