BookmarkSubscribeRSS Feed
juheej
Calcite | Level 5

Hi,

 

I need help with exporting data on SAS to excel.

 

The data is in SAS libraries and is accessed through SAS studio via WRDS database.

 

Further, the one of the data sets has close to 1351499 rows which is in excess of the number of rows in a single excel sheet.

 

Please guide has to how can I export this data to excel and save it on my PC.

 

The pics of the data view on SAS are attached for reference.

 

Best regards

3 REPLIES 3
Kurt_Bremser
Super User

Keep your data in SAS, where it belongs. Excel is useless for mass data. If you want copies of data for safe-keeping and external (non-SAS) access, export to csv and keep those files on your desktop.

ballardw
Super User

@juheej wrote:

 

Further, the one of the data sets has close to 1351499 rows which is in excess of the number of rows in a single excel sheet.

 


That is just one of the many reasons NOT to use Excel for data: file size limitations.

 

And if you follow @Kurt_Bremser's suggestion to use CSV then do not ever save the CSV if you open it with Excel. The result will truncate your data and may actually change values.

SuryaKiran
Meteorite | Level 14

I agree with @Kurt_Bremser , excel is not the right tool to handle large amount of data. If you still wish to go with it then I would suggest group the data with size (50k or so) & create excel with multiple sheets per group, so that each sheet will hold just 50k and not need to worry if you have large amount of data (This is not recommended way but a work around if you want to have large data in excel).

 

ods excel file='H:\SAS\test\groups.xlsx' ;
proc print data=mydata;
by group; /* create this variable to group records */
run;
ods excel close;

 

Thanks,
Suryakiran

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 485 views
  • 0 likes
  • 4 in conversation