1.0.6 • Published 5 years ago

js_table_to_excel v1.0.6

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

create excel by Javascript or React for table

##Install npm install js_table_to_excel

##Basic usage on React

import React, { Component } from "react"
import { tableToExcel } from "js_table_to_excel"

class excelTable extends Component {
  render() {
    return (
      <div>
        <table id="example">
          <thead>
            <tr>
              <th>Name</th>
              <th>Position</th>
              <th>Office</th>
            <tr>
          </thead>
          <tbody>
            <tr>
              <td>Tiger Nixon</td>
              <td>System Architect</td>
              <td>Edinburgh</td>
            </tr>
            <tr>
              <td>Garrett Winters</td>
              <td>Accountant</td>
              <td>Tokyo</td>
            </tr>
            <tr>
              <td>Ashton Cox</td>
              <td>Junior Technical Author</td>
              <td>San Francisco</td>
            </tr>
          </tbody>
        </table>
        <button onClick={() => tableToExcel("example","abishek")}>Export</button> // pass parameters as id, filename(optional)
      </div>
    )
  }
}

export default excelTable
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago