Hello Experts,
Please, I want to export a sas data set into .xlsx file in sas 9.2.
I have used export proc and ods intruction(it generate .xlsx file), but I can ont open the .xlsx file.
Thank you.
9.2 can only create xls format files, IIRC.
Please post code&log, and which operating system your SAS runs on.
@Kurt_Bremser :Thank you.
Please, IIRC ? you mean by that ? : if I recall correctly
ods tagsets.excelxp file='K/JM/multisheet.xlsx' options( sheet_name='Test_1' ); proc print data=First_test; run; ods tagsets.excelxp close;
When using ods tagsets.excelxp, you create a XML file, so you also should use the .xml filename extension. Excel will complain if the file format does not match the extension. And you are right about the IIRC acronym.
And which error message are you getting from Excel when trying to open the file?
Hi @LineMoon,
In order to use the IMPORT and EXPORT procedures to read and write Microsoft Excel files requires the SAS/ACCESS to PC Files module. This maybe the reason why you are not able to open the .xlsx file.
Thanks,
Samantha
@sabisw : Thank you.
But, why I can open .xls file, when I use ods with proc print ? but I can create .xlsx file, but I can not open it ?
Thank you.
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.