File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,46 @@ Dependencies: React >= 0.13.0
1919## Example
2020
2121``` javascript
22+ import React , {Component } from ' react' ;
23+ import ReactHTMLTableToExcel from ' react-html-table-to-excel' ;
24+
25+ class Test extends Component {
26+
27+ constructor (props ) {
28+ super (props);
29+ }
30+
31+ render () {
32+
33+ return (
34+ < div>
35+ < ReactHTMLTableToExcel
36+ table= " table-test"
37+ filename= " tabletest"
38+ sheet= " tablica"
39+ buttonText= " Download as XLS" / >
40+ < table id= " table-test" >
41+ < tr>
42+ < th> Firstname< / th>
43+ < th> Lastname< / th>
44+ < th> Age< / th>
45+ < / tr>
46+ < tr>
47+ < td> Jill< / td>
48+ < td> Smith< / td>
49+ < td> 50 < / td>
50+ < / tr>
51+ < tr>
52+ < td> Eve< / td>
53+ < td> Jackson< / td>
54+ < td> 94 < / td>
55+ < / tr>
56+ < / table>
57+
58+ < / div>
59+ );
60+ }
61+ }
62+
63+ export default Test
2264```
You can’t perform that action at this time.
0 commit comments