Path: news.mathworks.com!not-for-mail
From: "SURESH " <sureshkumarg@infotechsw.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Writing variable name and value from matlab workspace
Date: Wed, 1 Oct 2008 05:28:01 +0000 (UTC)
Organization: Infotech Enterprises Ltd
Lines: 27
Message-ID: <gbv1p1$8g3$1@fred.mathworks.com>
References: <gbsh1c$luc$1@fred.mathworks.com> <%tqEk.2561$i84.1493@newsfe10.iad>
Reply-To: "SURESH " <sureshkumarg@infotechsw.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1222838881 8707 172.30.248.37 (1 Oct 2008 05:28:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 1 Oct 2008 05:28:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1286576
Xref: news.mathworks.com comp.soft-sys.matlab:493051


Walter Roberson <roberson@hushmail.com> wrote in message <%tqEk.2561$i84.1493@newsfe10.iad>...
> SURESH wrote:
> 
> > 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.
> 
> Only by converting the name into a value and writing it along with the other
> values.
> 
> If you are using xlswrite() under MS Windows you can (I gather)
> write fairly sophisticated files, but under any of the other operating systems
> -effectively- in order to write a string as part of the data, you have to
> convert *everything* to text before-hand, including putting in all
> of the cell delimeters as part of the created text, and write out the text using
> dlmwrite() with the cell delimeter set to the empty string.

Hello Roberson,
Thanks for the reply.
Actually I'm working on MS Windows operating system. Could you please let me know how to convert the variable name as a value so that I can write both the name and value of the variable to an excel file. 
Currently I'm usinf active server to invoke an excel server then using the DDE command I'm pring the results to the excel file.

Any help in this is highly appreciated...

Thanks,
Suresh.