BookmarkSubscribeRSS Feed
mauley
Fluorite | Level 6

Hi Guys & Girls,

 

I am trying to export a data set and then update a sheet in excel with this data.

 

I have exported the data (lets call it My_data) and assigned its location to a library

 

I am using the following code:

 

PROC EXPORT data = library.my_data

dbms= xlsx

outfile= '\\location of excel.xlsx'

sheet = 'data';

QUIT;

 

It runs fine, as I expect it to but always seems to corrupt the excel and so I cant open it?

 

Is this something people have come across before?

 

Many Thanks,

4 REPLIES 4
Tom
Super User Tom
Super User

Note that DBMS=XLSX is different than DBMS=EXCEL.  The later uses Windows provided tools and the former uses only code provided with SAS and so can run on Unix.  It is also newer so what version of SAS are you using?  Perhaps you have an early buggy version of the XLSX engine?

mauley
Fluorite | Level 6

ah okay - I've got SAS EG Version 6.1

Tom
Super User Tom
Super User
Enterprise Guide is just the Windows based software you are using to submit code to SAS. What version of SAS is your EG software connecting to?
mauley
Fluorite | Level 6

ah, I'm doing well here aren't I!

 

9.4

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1361 views
  • 1 like
  • 2 in conversation