Saving into one Excel file with different spreadsheet

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Saving into one Excel file with different spreadsheet

Jarrod Teo-2
Hi,
 
Suppose if my spss data has yearly records say 2000-2010 and I want to export all into excel file as different spreadsheets.
 
However, if I export all the yearly records using the the following codes, I will have created 2 excel files on my com.
 
Is there a way to place all the data file into 1 excel file with 2000 spreadsheet to 2010 spreadsheet? It will be quite a disaster if I have to export 10 years of spss data file creating 10 separate excel files and have to reorganise them later on together as one excel file with ten spreadsheets.
 
I am asking this because I do know that output export, in my memory, can create different spreadsheets in an excel file to hold outputs.
 
Thanks.
Dorraj Oet
 
temp.
select if (year=2010).
save translate outfile 'C:\Excel2010.xls'
/type=xls
/version=8
/fieldnames
/replace
/cells=labels.

temp.
select if (year=2009).
save translate outfile 'C:\Excel2009.xls'
/type=xls
/version=8
/fieldnames
/replace
/cells=labels.
 
 


Hotmail: Powerful Free email with security by Microsoft. Get it now.
Reply | Threaded
Open this post in threaded view
|

Re: Saving into one Excel file with different spreadsheet

mpirritano

Try pasting the syntax you get from the following:

 

File -> Export to Database

 

Then choose excel. You can create separate sheets in an excel workbook this way

 

HTH

Matt

 

Matthew Pirritano, Ph.D.

Research Analyst IV

Medical Services Initiative (MSI)

Orange County Health Care Agency

(714) 568-5648


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of DorraJ Oet
Sent: Monday, May 03, 2010 11:41 PM
To: [hidden email]
Subject: Saving into one Excel file with different spreadsheet

 

Hi,
 
Suppose if my spss data has yearly records say 2000-2010 and I want to export all into excel file as different spreadsheets.
 
However, if I export all the yearly records using the the following codes, I will have created 2 excel files on my com.
 
Is there a way to place all the data file into 1 excel file with 2000 spreadsheet to 2010 spreadsheet? It will be quite a disaster if I have to export 10 years of spss data file creating 10 separate excel files and have to reorganise them later on together as one excel file with ten spreadsheets.
 
I am asking this because I do know that output export, in my memory, can create different spreadsheets in an excel file to hold outputs.
 
Thanks.
Dorraj Oet
 
temp.
select if (year=2010).
save translate outfile 'C:\Excel2010.xls'
/type=xls
/version=8
/fieldnames
/replace
/cells=labels.

temp.
select if (year=2009).
save translate outfile 'C:\Excel2009.xls'
/type=xls
/version=8
/fieldnames
/replace
/cells=labels.
 
 


Hotmail: Powerful Free email with security by Microsoft. Get it now.