BookmarkSubscribeRSS Feed
Kiran
Calcite | Level 5

From SAS when we run the proc export procedure to export the data into MS-Excel 2010 version i.,e XLSX extension the spreadsheet created successfully.
When I try to open the spread sheet its throwing me the pop-up like ‘’ "Excel Found Unredable Contents '..........xlsx' do you want to recover the contents of this workbook? If you trust the source of this work book click 'yes'”

Even though if u click yes the data will not be there in the spreadsheet.
SAS version is 9.3
SAS Procedure used to export the data:
Proc export dbms=xlsx
Data=a outfile ‘ b.xlsx’ replace
Sheet=’’All’’;
Run;

2 REPLIES 2
art297
Opal | Level 21

The answer is dependent upon which version of sas you are using, which operating system you're on, and whether you license SAS/Access for pc file formats.

I don't think dbms=xlsx is valid.  try it with dbms=excel

streamfisher
Calcite | Level 5

SAS Import Wizard is not that reliable, even when converting an .xlsx to .xls (93-2000 version). For example, columns with mixed types are often improporely read into SAS, such that missing data occurs. Consider a column with a majority of 3 digit numeric values and a small number of values having leading zeros. Those latter values are missed by the Import Wizard and converted to missing values (null).

Even changing the INFORMAT while in the Wizard does not always work and the blanks occur. (E.g. try this with ICD-9 or DRG codes.)

I get consistent and accurate imported products with the fewest problems when I first convert the native Excel file to a .csv file. Next. I'll import the .csv file into SAS.  .csv files import quite easily if you are using R.

I hope this is a viable option for you.

sas-innovate-2024.png

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.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 984 views
  • 0 likes
  • 3 in conversation