File: example.html

Recommend this page to a friend!
  Classes of Gianluca Zanferrari   JavaScript HTML Table Excel Export   example.html   Download  
File: example.html
Role: Example script
Content type: text/plain
Description: example
Class: JavaScript HTML Table Excel Export
Export HTML table data to Excel format
Author: By
Last change:
Date: 8 years ago
Size: 812 bytes
 

Contents

Class file image Download
<!DOCTYPE html> <html> <script language="javascript" type="text/javascript" src="table2Excel.js"></script> <table id="result-table"> <thead> <tr style="background-color: #ccc"> <th>Number</th> <th>First Name</th> <th>Last Name</th> <th>Points</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> <tr> <td>2</td> <td>John</td> <td>Doe</td> <td>80</td> </tr> <tr> <td>3</td> <td>Adam</td> <td>Johnson</td> <td>67</td> </tr> <tr> <td>4</td> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> </tbody> </table> <a href="javascript: void(0)" onclick="var obj = new table2Excel(); obj.CreateExcelSheet('result-table','export');">to Excel</a> </html>