# Download CSV

Exporting html table data as .csv file

To enable it we need to include download-csv attribute and to mention the csv file name. In here we mentioned table.csv.

# Usage

<div>
  <su-table :headers="dataHoldingsHeader" :data="dataHoldings" download-csv="table.csv">
    <template slot-scope="props">
      <td>
        {{ props.row.tradingsymbol }}
      </td>
      <td>
        {{ props.row.collateral_value }}
      </td>
      <td>
        {{ props.row.pledge_qty }}
      </td>
      <td>
        {{ props.row.loan_value }}
      </td>
    </template>
  </su-table>
</div>

<script>
export default {
  components: {
    "su-table": DataTable
  },
  data () {
    return {
      // headers and data arrays are available in the table introduction section
      dataHoldingsHeader: headers,
      dataHoldings: data
    }
  },

}
</script>
Download
Symbol Max available (₹) Pledge Qty Amount required (₹)
QUICKHEAL 127 1 253.25
UPL 367 1 734.85
L&TFH 165 2 330.9
AXISBANK 3506 11 7011.4
WONDERLA 155 1 309.15
IDFCBANK 22 1 44.9