Desktop productivity for business analysts and programmers

Exporting data to excel in separate worksheet

Reply
Frequent Contributor
Posts: 97

Exporting data to excel in separate worksheet

How to export data to excel but in two separate spreadsheets.

We cannot use PROC EXPORT as we do not have license.
N/A
Posts: 0

Re: Exporting data to excel in separate worksheet

option _last_= sashelp.class ;
ods tagsets.excelxp file='your.workbook.xls' style= default;
proc print;
proc means;
run;
ods _all_ close ;
Occasional Contributor
Posts: 15

Re: Exporting data to excel in separate worksheet

Does this only work for Excel XP or will it work for Excel 2000 as well? (Yes, we still are using Excel 2000.)
SAS Super FREQ
Posts: 8,820

Re: Exporting data to excel in separate worksheet

Hi:
TAGSETS.EXCELXP generates MIcrosoft Spreadsheet Markup Language XML tags that describe the worksheet. Sadly, Microsoft introduced this XML description of the spreadsheet in Office 2002/2003. So even if you have SAS 9 and CAN create SpreadsheetML XML with SAS, you can only open it with Office 2002/2003 or higher.

If you use ODS HTML, you can create multiple HTML files; and then, there is one method for linking those separate HTML files together -- again, using a Microsoft form of XML and HTML for describing the relationship of the files. Basically, for this to work, you would use SAS to create the multiple HTML files. But, unless you know a lot about coding SAS data step programs, building the HTML and XML to link the files together is a manual process. (That method is described in this presentation:
http://support.sas.com/rnd/base/ods/excel/multisheet_excel_post.ppt )

cynthia
N/A
Posts: 0

Re: Exporting data to excel in separate worksheet

Hi Cynthia
This is great, but for some reason, I get the error message: ERROR: Insufficient authorization to access c:\your workbook.xls, although it works if I put the file on our server and change the file name accordingly...
Ask a Question
Discussion stats
  • 4 replies
  • 146 views
  • 0 likes
  • 4 in conversation