03-22-2016 05:05 PM
I have 4 sas datasets ab bc ca db
and i have to export to excel so that te excel workbook has 4 sheets ab bc ca and i need to share the excel file to the share point location
as i dont have PC SAS and my SAS is on Citrix (Remote SAS )
can anyone pls help
03-23-2016 06:07 AM
Wel, there are two separate questions there.
1) Create a spreadsheet with the four tabs.
For this, what version of SAS do you have? If before 9.4 then your best bet is to use tagsets.excelxp:
ods tagsets.excelxp file="c:\test.xml" options(sheet_name="A"); proc report...; run; ods tagsets.excel options(sheet_name="B"); proc report...; run; ... ods tagsets.excelxp close;
Now this creates a file with the extension .XML, which it should as the output is not native Excel file, but XML which can be opened in Excel. So your users would have to remember that - you could change to XLSX, but that just adds confusion and you will get a box open in Excel for it.
Now if you have 9.4, you can write out native XLSX files, with the libname excel statement:
2) Upload the documents to Sharepoint.
For this, you will need your IT group. First you have to have the UNC to the area on Sharepoint you want to upload to. You then need the SAS install to have the access rights to do such an operation. Then you should just be able to use that UNC in your file statement:
ods tagsets.excelxp file="//unctosharepoint/folder/somewher"...;
03-23-2016 10:27 AM
I have to check whether i have access to create excel file in share point . So can we export sas datasets from SAS EG which is on remote server (accessing sas from citrix link )