I use an excel SAS add-in that let's me run SAS code. I develop the code in SAS Studio. The resulting dataset in the excel worksheet has some very wide column widths. The wide columns are for variables with lengths of 12,000 for free form entry. I do not want to truncate any of the text.
Is there control the column width in excel?
Proc print data=mydata;
Run;
To set all of the cells to the same width something like:
proc print data=sashelp.class style(data)={cellwidth=1in} ; run;
If you want to set specific variables widths then you will need to add VAR statements to list the variables and set the style for the specific variable to a desired width such as
proc print data=sashelp.class ; var name sex age; var height /style={cellwidth=2in}; var weight; run;
Which leaves SAS defaults for the variables without the style override and sets that one variable to a width of 2 inches.
Anything with 12,000 characters is likely going to result in very tall cells if you reduce the width to 1 or two inches. You will have to investigate the Excel formats to turn off wordwrap, which I can't help with if that happens.
ballardw:
Thanks for replying. the SAS excel add-in tool appears to not use all of the SAS coding controls, as this did not work (similar result as my other forum thread). If anyone uses the excel add-in, please chime in. Any suggestions are appreciated.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.