-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.html
73 lines (67 loc) · 1.47 KB
/
test.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="./dist/xlsx.global.js"></script>
<script>
const xlsx = new XLSX();
const redText = xlsx.style({
color: '#f00',
fontFamily: 'Baloo Bhaijaan',
fontWeight: 'bold',
fontSize: 14,
textDecoration: 'line-through',
fontStyle: 'italic',
backgroundColor: '#0f0',
textAlign: 'center',
verticalAlign: 'middle',
borderStyle: 'double',
borderColor: '#00f',
});
const sheet1 = xlsx.sheet('Sheet 1');
sheet1.row(6).height(100);
console.log(sheet1.row(6).height());
sheet1.col(5).width(20);
console.log(sheet1.col(5).width());
sheet1.style({
rtl: true,
});
sheet1
.row(10)
.col(1)
.set(120000);
console.log(
sheet1
.row(10)
.col(1)
.get()
);
sheet1.cell(10, 2).set(120000);
sheet1.set(120000, { row: 10, col: 3 });
sheet1.set('bbb', {
row: 6,
col: 5,
style: redText,
});
sheet1.cell(1, 1).set([
'People',
['vzf', 'vzf2', 'vzf3'],
'gdb',
'bsy',
'kga',
'lbv',
'tew',
]);
sheet1.addFilter({
from: { row: 1, col: 1 },
to: { row: 7, col: 1 },
});
xlsx.save('test.xlsx');
</script>
</head>
<body>
</body>
</html>