Updating an Excel worksheet

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

Updating an Excel worksheet

Singh, Amrita
Hi,
 
I was wondering if it is possible to update a specific worksheet in
Excel from either Python or SPSS. I have an Excel file with 12
worksheets - one for each month. Every month I run a report that needs
to write out to specific columns in the correct worksheet.  Any help
would be much appreciated.
 
Many thanks,
Amrita
 
 

====================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
Reply | Threaded
Open this post in threaded view
|

Re: Updating an Excel worksheet

Oliver, Richard
If you want to update the Excel spreadsheet with columns of data from an SPSS dataset, you can use SAVE TRANSLATE /TYPE=ODBC or the Export to Database Wizard, since you can treat Excel as an ODBC data source. Each sheet in the Excel workbook is treated as a database table. You can use standard SQL statements to write the specific columns to a specific sheet in the workbook.

In SPSS 17, you can also update specific sheets in specific workbooks with output from the Viewer using the OUTPUT EXPORT command or the Export Output dialog.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Singh, Amrita
Sent: Wednesday, November 05, 2008 4:18 PM
To: [hidden email]
Subject: Updating an Excel worksheet

Hi,

I was wondering if it is possible to update a specific worksheet in
Excel from either Python or SPSS. I have an Excel file with 12
worksheets - one for each month. Every month I run a report that needs
to write out to specific columns in the correct worksheet.  Any help
would be much appreciated.

Many thanks,
Amrita



=======
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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Updating an Excel worksheet

Singh, Amrita
Thank you Richard! I am working with Version 16 and will have to give
the ODBC a try.

Regards, Amrita


-----Original Message-----
From: Oliver, Richard [mailto:[hidden email]]
Sent: Wednesday, November 05, 2008 5:31 PM
To: Singh, Amrita; [hidden email]
Subject: RE: Updating an Excel worksheet

If you want to update the Excel spreadsheet with columns of data from an
SPSS dataset, you can use SAVE TRANSLATE /TYPE=ODBC or the Export to
Database Wizard, since you can treat Excel as an ODBC data source. Each
sheet in the Excel workbook is treated as a database table. You can use
standard SQL statements to write the specific columns to a specific
sheet in the workbook.

In SPSS 17, you can also update specific sheets in specific workbooks
with output from the Viewer using the OUTPUT EXPORT command or the
Export Output dialog.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Singh, Amrita
Sent: Wednesday, November 05, 2008 4:18 PM
To: [hidden email]
Subject: Updating an Excel worksheet

Hi,

I was wondering if it is possible to update a specific worksheet in
Excel from either Python or SPSS. I have an Excel file with 12
worksheets - one for each month. Every month I run a report that needs
to write out to specific columns in the correct worksheet.  Any help
would be much appreciated.

Many thanks,
Amrita



=======
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

=====================
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