1.0.7 • Published 3 years ago
jsxtabletoexcel
Licence
ISC
Version
1.0.7
Deps
0
Size
11 kB
Vulns
0
Weekly
0
For downloading Xls File :
use downloadExcel function -
sheetName - String
fileName - String
Example:
import {downLoadExcel} from "jsxtabletoexcel"
const tableRef = useRef(null)
| Name | Age | Dob | City |
|---|---|---|---|
| Bruce Wayne | 23 | 17/11/98 | CBE |
<Button onClick={() => downLoadExcel(tableRef.current,sheetName,fileName)}> Click ME
For downloading csv file :
use downloadCsv function -
targetRef - ref of the table to be exported
fileName - String
Example: import {downloadCsv} from "jsxtabletoexcel"
const tableRef = useRef(null)
| Name | Age | Dob | City |
|---|---|---|---|
| Bruce Wayne | 23 | 17/11/98 | CBE |
<Button onClick={() => downloadCsv(tableRef.current,fileName)}> Click ME