hello! i am using this script to export html table to excel.

Code:
var Contents = $('#schedT').html();    
			window.open('data:application/vnd.ms-excel, ' +  '<table>'+encodeURIComponent($('#schedT').html()) +  '</table>' );
			alert("Exporting files to Excel.");
My problems are, 1. There are no borders in excel when the table is shown.
2. How can I change the default filename which is 'download.xls'
to 'sample.xls'??

Any help??