Most procedures in SAS generate stylish tables in the output HTML files. An option to sort the tables without bothering SAS again will be very handy for people who are familiar with Excel.
proc print data = sashelp.class; run;with the jQuery plug-in will have sortable effect above.
How to do it
First we open the HTML file by any text editor such as Windows Notepad, and the head lines of the file by the SAS command
proc print data = sashelp.class; run;will be like --
The second thing is to copy and paste the 7 lines of JavaSctipt above to the HTML file, just under the title tag. Then all is just done. All SAS tables can be sorted now as long as you have Internet connection. No server or other software is needed.
Another way to do it is to use a SAS macro. Andrew has a nice demo on his blog for implementing it.