Help using Base SAS procedures

Export to worbook using SAS 9.2

Reply
Super Contributor
Posts: 256

Export to worbook using SAS 9.2

I have code to do this but it only works for other versions of sas. Is there a way this can be done using 9.2?

PROC Star
Posts: 7,356

Re: Export to worbook using SAS 9.2

I presume you mean Excel workbook.  What code are you using? What operating system are you on? Do you license SAS/Export for PC File Formats? Is your Excel 32 bit, but your SAS is 64 bit?

Contributor
Posts: 60

Re: Export to worbook using SAS 9.2

Please share the sample code which you are using to generate the workbook.As Arthur query,workbook means excel right!!!!

Super Contributor
Posts: 256

Re: Export to worbook using SAS 9.2

Yes, Excel workbook, am using windows operating system. Excel is 32 bit and SAS is 64 i think since under software info it says 64X. Don't think I have SAS/Export license. Code is

Proc export data = file1

                    outfile = "location.xls"

                    DBMS = xls replace;

run;

Thanks

PROC Star
Posts: 7,356

Re: Export to worbook using SAS 9.2

Since you say it ran on previous versions of SAS there is a chance that you license but no one installed SAS/Access for PC file formats. A quick way to see if that is the problem would be to see if you do license it:

proc setinit noalias;

run;

Super Contributor
Posts: 256

Re: Export to worbook using SAS 9.2

Hi Arthur

I ran that and it appears we don't hae the license. We just have Base Product and 'SAS Workspace Server for Local Access'. Without the license I presume it is not possible?

Contributor
Posts: 60

Re: Export to worbook using SAS 9.2

Please use DBMS=excel replace; in your code

Super Contributor
Posts: 256

Re: Export to worbook using SAS 9.2

Hi Pravin

That doesn't work unfortunately - i get an error message that reads "DBMS type EXCEL is not valid for export"

SAS Super FREQ
Posts: 8,740

Re: Export to worbook using SAS 9.2

Hi:

When you have a "bitness" mismatch, such as SAS 64 bit and Office 32 bit, you sometimes need a "helper" application called the PC File Server to aid in doing imports and exports. When you use the PC File Server, the DBMS= option needs to be DBMS=EXCELCS. Under some circumstances, DBMS=XLS might work, but I don't remember whether the REPLACE and SHEET= work with these 2 different options. To figure out exactly what you need to do given your software installation, Office configuration and bitness mismatch, I recommend working with Tech Support. Especially since you also have a Workspace Server involved in your configuration, you might have the BI Platform or Office Analytics and that could complicate the answer.

cynthia

Ask a Question
Discussion stats
  • 8 replies
  • 382 views
  • 0 likes
  • 4 in conversation