Easiest way to do it is to spawn a new window, write to it, print it, close it.
like this:
Code:
//Open a new window
newwin = open("","newwin","width=400, height=250, status=no, toolbar=no, menubar=no, scrollbars=yes");
//write to it
newwin.document.write('<html><body>');
//write table code here
newwin.document.write('<table>...</table>');
//write end code
newwin.document.write("<br><br><center><input type=button value='Close This Window' onClick='javascript:window.close();'></body></html>");
//try and close the window automatically
newwin.close();