-
Support for Microsoft Excel that uses the ODS EXCEL statement.
Hi ,
I am trying to use ODS excel to have a dataset written to excel as is. I had tried proc export it works but has got some formatting issues. So i thought of trying ODS excel.
Below is my test code : Any suggestions/ solutions much appreciated.
ods _all_ close;
data _null_;
x "mkdir -p /RiskModel4/Projects/ALTA_2020/IPT/regdata/sample329/ARM/Log/Checks";
x "chmod -R 777 /RiskModel4/Projects/ALTA_2020/IPT/regdata/sample329/ARM/Log/Checks";
run;
ods excel file="/RiskModel4/Projects/ALTA_2020/IPT/regdata/sample329/ARM/Log/Checks/temptest2.xlsx" options(start_at="3,3"
frozen_headers="5"
frozen_rowheaders="3"
autofilter="1-5"
sheet_name="Sales Report"
row_repeat="2"
embedded_titles="yes");
proc print data=lib.REGDATA2_T3C_329;
title "Test";
run;
ods excel close;
In the log i get the below erorr
ERROR: ZIP entry duplicate name: _rels/.rels.
Which SAS version are you on, and which operating system?
A quick test:
ods excel
file="/folders/myfolders/test.xlsx"
options(
start_at="3,3"
frozen_headers="5"
frozen_rowheaders="3"
autofilter="1-5"
sheet_name="Sales Report"
row_repeat="2"
embedded_titles="yes"
)
;
proc print data=sashelp.class;
title "Test";
run;
ods excel close;
on SAS UE caused no visible problem in the log, and the file could be opened with LibreOffice (Mac). It might be something in your data.
HI Kurt,
The OS is UNIX server. I am using SAS EG 8.2 . And i tried the test code you shared after changing the file path. I am still getting the sam eerror. Thanks!!
Show your full log please.
Did you get solution for this problem? I am exactly facing some issues in my new organization and not sure if this is related to SAS package/they have disabled few features etc?
Cheers,
Hey, sorry for the delayed response. I did not dig much into the issue further as one of my teammate had found a work around. We used SAS for data prep and we used VBA for creating reports that we needed.
But i think there are some issues while working on UNIX grid through SAS EG on windows platform.
Try using the same code on BASE SAS on windows OS.
This has likely to do with the SAS version being used. Please show the result of the following code:
%put NOTE: &sysvlong4;
ODS EXECL destination is production since:
That is the 7+ years old M0. Upgrade ASAP.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.