-
-
Notifications
You must be signed in to change notification settings - Fork 305
/
index.bigtable.html
55 lines (50 loc) · 1.82 KB
/
index.bigtable.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html>
<head>
<meta charset="utf-8">
<title>Export to excel test</title>
<script src="dist/excellentexport.js"></script>
<style>
table, tr, td {
border: 1px black solid;
}
</style>
<script>
function action(format) {
return ExcellentExport.convert({
anchor: 'bigdata-' + format,
filename: 'big_table.' + format,
format: format
}, [{
name: 'Big Table',
from: {
table: 'bigtable'
}
}]);
}
</script>
</head>
<body>
<h1>ExcellentExport.js</h1>
Check on <a href="http://jordiburgos.com">jordiburgos.com</a> and <a href="https://github.com/jmaister/excellentexport">GitHub</a>.
<h3>Big Table Test page</h3>
<a id="bigdata-xlsx" download="bigdata.xlsx" href="#" onclick="return action('xlsx')">Export to XLSX very big table</a><br/>
<a id="bigdata-xls" download="bigdata.xls" href="#" onclick="return action('xls')">Export to XLS very big table</a><br/>
<a id="bigdata-csv" download="bigdata.csv" href="#" onclick="return action('csv')">Export to CSV very big table</a>
<table id="bigtable">
<br/>
</table>
<script>
var table = document.getElementById('bigtable');
var n = 5000;
var cols = 50;
var i, j;
for (i=0; i < n; i=i+1) {
var row = table.insertRow(0);
for (j=0; j < cols; j=j+1) {
var cell = row.insertCell(0);
cell.innerHTML = "Test " + Math.random();
}
}
</script>
</body>
</html>