|
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Automatic digest processor Sent: Tuesday, June 22, 2010 12:00 AM To: Recipients of SPSSX-L digests Subject: SPSSX-L Digest - 20 Jun 2010 to 21 Jun 2010 (#2010-174) ------------------------------ Date: Mon, 21 Jun 2010 14:24:33 -0700 From: Bozena Zdaniuk <[hidden email]> Subject: LIST command output file Hello, All. Is there a way to send the output file created by the LIST VARS command as an excel file in which each variable whose values are listed is in a separate excel column? Right now, when I save the output as an excel file, everything is in the first column, probably because the output is really a text file not a table, right? Bozena Bozena Zdaniuk, Ph.D. Human Early Learning Partnership (HELP) College for Interdisciplinary Studies UBC - UVic - SFU - UNBC - TRU - UBCO 440 - 2206 East Mall, Vancouver BC V6T 1Z3 Tel: 604-827-5552 / Fax: 604-822-0640 www.earlylearning.ubc.ca ------------------------------ There are two ways I can think of to do this. If it's the whole data file you want, you can export directly to Excel or to a comma-delimited file. If it's a small number of variables (more likely if you're using LIST), I do something like: List var = var1 '#' var2 '#' var3 '#' ...var n. Then in Excel I can use the data/text to columns/delimited and then specify the delimiter - in this case, #. To save typing you can do: String q (a1). Compute q = '#'. And then do: List var = var1 q var2 q var3 q ... varn. Of course, you need to be confident that your delimiter won't appear anywhere in your listing output and need to be careful to specify the delimiter each time between variables. Doubtless others who are cleverer than I could find ways to automate this process, but it's pretty easy for a relatively small number of variables. Leslie Horst, Ph.D. Senior Consultant Maguire Associates, Inc. 5 Concord Farms 555 Virginia Rd., Suite 201 Concord, MA 01742 ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Dear Bozena,
Can't you use 'save translate'? With TEMP and SELECT IF you can select respondents and with the KEEP subcommand you can select variables. HTH, Ruben van den Berg Consultant Models & Methods TNS NIPO Email: [hidden email] Mobiel: +31 6 24641435 Telefoon: +31 20 522 5738 Internet: www.tns-nipo.com *Test data. data list free/id. begin data 1 2 3 4 5 6 7 8 9 10 end data. do repeat v=v1 to v4. compute v=0. end repeat. *Select respondents. temp. select if id le 5. *Save as excel. sav tra out 'c:\temp\test.xls' /fieldnames /replace /version 8 /keep id v1 v2. > Date: Tue, 22 Jun 2010 10:47:56 -0400 > From: [hidden email] > Subject: Re: SPSSX-L Digest - 20 Jun 2010 to 21 Jun 2010 (#2010-174) LIST command output file > To: [hidden email] > > -----Original Message----- > From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Automatic digest processor > Sent: Tuesday, June 22, 2010 12:00 AM > To: Recipients of SPSSX-L digests > Subject: SPSSX-L Digest - 20 Jun 2010 to 21 Jun 2010 (#2010-174) > > ------------------------------ > > Date: Mon, 21 Jun 2010 14:24:33 -0700 > From: Bozena Zdaniuk <[hidden email]> > Subject: LIST command output file > > Hello, All. Is there a way to send the output file created by the LIST > VARS command as an excel file in which each variable whose values are > listed is in a separate excel column? Right now, when I save the output as > an excel file, everything is in the first column, probably because the > output is really a text file not a table, right? > Bozena > > Bozena Zdaniuk, Ph.D. > Human Early Learning Partnership (HELP) > College for Interdisciplinary Studies > UBC - UVic - SFU - UNBC - TRU - UBCO > 440 - 2206 East Mall, Vancouver BC V6T 1Z3 > Tel: 604-827-5552 / Fax: 604-822-0640 > www.earlylearning.ubc.ca > > ------------------------------ > There are two ways I can think of to do this. If it's the whole data file you want, you can export directly to Excel or to a comma-delimited file. If it's a small number of variables (more likely if you're using LIST), I do something like: > > List var = var1 '#' var2 '#' var3 '#' ...var n. > > Then in Excel I can use the data/text to columns/delimited and then specify the delimiter - in this case, #. > > To save typing you can do: > > String q (a1). > Compute q = '#'. > > And then do: > > List var = var1 q var2 q var3 q ... varn. > > Of course, you need to be confident that your delimiter won't appear anywhere in your listing output and need to be careful to specify the delimiter each time between variables. Doubtless others who are cleverer than I could find ways to automate this process, but it's pretty easy for a relatively small number of variables. > > Leslie Horst, Ph.D. > Senior Consultant > Maguire Associates, Inc. > 5 Concord Farms > 555 Virginia Rd., Suite 201 > Concord, MA 01742 > > ===================== > To manage your subscription to SPSSX-L, send a message to > [hidden email] (not to SPSSX-L), with no body text except the > command. To leave the list, send the command > SIGNOFF SPSSX-L > For a list of commands to manage subscriptions, send the command > INFO REFCARD Express yourself instantly with MSN Messenger! MSN Messenger |
| Free forum by Nabble | Edit this page |
