Is there any automatic way to resize columns in VIEWTABLE? Here's one sample code.
filename LIPSUM temp;
proc http method="get" out=LIPSUM
url="https://en.wikipedia.org/wiki/Lorem_ipsum";
run;
data LIPSUM;
infile LIPSUM length=LENG lrecl=32767;
input LINE $varying32767. LENG;
LINE=strip(LINE);
if count(LINE,"Lorem ipsum dolor sit amet,");
LINE=tranwrd(LINE,"<p>","");
LINE=tranwrd(LINE,"<i>","");
LINE=tranwrd(LINE,"</i>","");
LINE=strip(LINE);
run;
quit;
This code may generate one dummy sentence that is too long to be displayed with no line break. As expected, here's the default view by VIEWTABLE.
There would be no problem technically as long as the data contain the sentences appropriately, but I still wonder if it's possible to automatically fit the column (or assign a specific width manually, or disable the automatic text wrap) as a matter of convenience. Hopefully, I want to force VIEWTABLE to display the sentence in one line and enable the horizontal scrollbar below, but any reasonable alternative would be also welcome. Dragging columns to expand every time is just pesky. By the way, I tried formatting (format LINE $100.) already, but it didn't adjust the column width. Thanks beforehand.
This board says the easiest way to turn off line-wrapping is to use ODS output to HTML:
Then this SAS Note says, to do that in HTML, you would need to use a template code they provide:
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!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.