BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RJ2016
Fluorite | Level 6

Hi Is there a way to proc export to network area XLSX currently it fails so having to export as xlsb.

 

I can proc export xlsx to UNIX area then use a 'copy files to/from server ' task to put on network, however it seems to change the formatting within the excel like dates


proc export dbms=excelcs data=masteroutput outfile="\\thu.network2\ut\Master&file_date.&version..xlsb" replace;
   version="2007";                        
   sheet="master";
   server='*******************';    
   port=3245;                             
RUN;

 

FYI: SERVER DETAILS HASHED OUT

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

Well, if your going from Unix system (where SAS is installed yes?) to a Windows network path then I would imagine you will need to ftp the file across.  Unix/Win based systems are different.  

 

As for your other problem, Excel is a really bad choice for data.  It has built in "functionality" which alters your data for viewing purposes in its best guess.  It needs to recognise that something is a date to display it as a date for instance.  Proc export is really a very basic function for the export to Excel, again I wouldn't suggest using that for any purpose.  If you need a nice viewable report in Excel, then use ods tagsets.excelxp, or ods excel or something along those lines.  Then in your proc report you can apply Excel specific formatting amongst many other things.  That being said, I would only use Excel for reports - i.e. something not to be used for anything further - and even then only after trying one of the other options such as PDF.  For any kind of data transfer use an open plain text based format such as CSV or XML.

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

Use csv as transfer format (and write with a manually created data step), so you can check the contents with a text editor.

Note that you have to supply data in formats that Excel interprets correctly, so you will have to tweak your process until you get the wanted result.

Welcome to the world of Excel idiosyncrasies.

 

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

 

Well, if your going from Unix system (where SAS is installed yes?) to a Windows network path then I would imagine you will need to ftp the file across.  Unix/Win based systems are different.  

 

As for your other problem, Excel is a really bad choice for data.  It has built in "functionality" which alters your data for viewing purposes in its best guess.  It needs to recognise that something is a date to display it as a date for instance.  Proc export is really a very basic function for the export to Excel, again I wouldn't suggest using that for any purpose.  If you need a nice viewable report in Excel, then use ods tagsets.excelxp, or ods excel or something along those lines.  Then in your proc report you can apply Excel specific formatting amongst many other things.  That being said, I would only use Excel for reports - i.e. something not to be used for anything further - and even then only after trying one of the other options such as PDF.  For any kind of data transfer use an open plain text based format such as CSV or XML.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1048 views
  • 0 likes
  • 3 in conversation