I am using SAS 9.3. I often have to export data to an excel file. To do this I have been using proc export with the dbms = xlsx. I initially found that unless I added sheet = 'sheet name' the file would not open and say it was corrupted and needed to be repaired. I've since made sure to add this sheet name everytime I export. Generally, proc export works fine, but every now and then I run into the same issue where the excel file says it is corrupted. I don't get any errors in sas when I do this, in fact, it always tells me the file was created successfully. The last time this happened, I did notice that the data file was fairly large (it really varies from project to project), probably around 500,000 line items. I don't know if having large data could be an issue. Any ideas on how to fix this? Here is an example of the code I use: proc export data = population outfile = "Path name here\The file name.xlsx" dbms = xlsx replace; sheet='Population'; run; Also, I was wondering if there is a way to export multiple sheets into the same file. When I was using 9.2, I could just use dbms = excel, and it would add a new tab each time I ran the code (keeping the file name and path the same and changing the sheet name and data to put into it. The xlsx option for the dbms however doesn't seem to work the same way. Any suggestions? Thanks, Tony
... View more