I have a table in HTML format.
<table id="table" title="banner" border="1" align="center" >
<tr><th>ID</th><th>Name</th><th>Month</th><th>Savings</th></tr>
<tr><td>101</td><td>Ramesh</td><td>January</td><td>$100</td></tr>
<tr><td>102</td><td>Ram</td><td>Feb</td><td>$200</td></tr>
<tr><td>103</td><td>Ramna</td><td>Mar</td><td>$300</td></tr>
</table>
</body>
</html>
I am using Mozilla 3.6 .so how can I export the results to Excel sheet ?
if you mean, as statet by VinayC in one of the comments, to export the generated HTML without having to make another trip to the server, it works just fine with Downloadify.
Description on GitHub:
I am actually using it together with jquery 1.4.4 in our business-environment. I have to display tables with 10k+ rows and about 15 cols which make up for 13.5mb of data.
html_wrapper_pre
andhtml_wrapper_after
are the opening and closing html-structures with provided encoding.Why does it have to be MSExcel format?
You can't (easily) get from an HTML page to a local file using javascript. OTOH if the source data is not HTML and you've got a serverside programming language, you can serve up the file in a suitable format - but I'd very strongly recommend using text/csv rather than application/vnd.ms-excel
With MSIE you can copy from an html page to the clipboard - but that's an MSIE only function.
You can export a HTML table to Excel using pure JavaScript. Here is a working example: http://jsfiddle.net/y0jwhnco/1/