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

Hello!

 

I am doing export sas data to excel through proc export.

My code looks like:

proc export data=table1
outfile=&path.
label dbms xlsx replace;
putnames=yes;
sheet='Sheet1'
%run

But when I am getting data to excel all columns are randomly autofitted.

Does anybody know, can I add something in the code to get excel column width being having default value(64)?

 

THX!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
I don't believe there's a control for that in PROC EXPORT, but you could switch to ODS EXCEL and set the column width there manually. But it's slower and will apply formats.

View solution in original post

2 REPLIES 2
Reeza
Super User
I don't believe there's a control for that in PROC EXPORT, but you could switch to ODS EXCEL and set the column width there manually. But it's slower and will apply formats.
Ivan555
Quartz | Level 8

Understood. Perhaps Ods Excel is the only solution. Thank you 🙂

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1421 views
  • 1 like
  • 2 in conversation