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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.