?Question regarding Table to excel

?Question regarding Table to excel

Hey guys, 

I am new to Jquery and was wondering if anyone can help me out.

I have a auto generated table with a function to save it, and download to an excel spreadsheet , My question is... is it possible to save the escel spreadsheet server side and sent it in an email to the user?

Here is the current code for the download. 

<script type='text/javascript'>//<![CDATA[ 
$(window).load(function(){
$( "#saveExcel" ).click(function() {  
  var stats = $('#stats').html();    
  window.open('data:application/vnd.ms-excel,' + $('#stats').html());
});
});//]]> 

No i know saving server side might take room but these are small tables, 

Any help would greatly be apreciated.