🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

vue-table-to-excel

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-table-to-excel

Export the json data as an excel spreadsheet

1.0.6
latest
npm
Version published
Weekly downloads
388
84.76%
Maintainers
1
Weekly downloads
 
Created
Source

vue-table-to-excel

Travis (.com) Codecov npm npm npm bundle size GitHub last commit NPM

Installation

$ npm install vue-table-to-excel

Usage

Single File Component Example:

Support for local configuration

+ component
<script>
import { jsontoexcel } from "vue-table-to-excel";
export default {
  data() {
    return {
      json: {
        dataSource: [
          { name: "Tom", phone: "+86 01012", email: "000@gmail.com" },
          { name: "Jack", phone: "+86 01012", email: "000@gmail.com" },
          { name: "Alice", phone: "+86 01012", email: "000@gmail.com" }
        ],
        head: ["name", "phone", "email"],
        fileName: "download.xlsx"
      }
    };
  },
  methods: {
    download() {
      const { data, head, fileName } = this.json;
      jsontoexcel.getXlsx(data, head, fileName);
    }
  }
};
</script>

API

getXlsx

src/index.js:16-44

A series of mixins is automatically generated for the url synchronization function

Parameters

  • options {{}} A map of $route.query keys to vm's property path
    • options.KeyOfOptions {string} Key of options is the value key on url query string, and its also the key in vm.$route
    • options.ValueOfOptions {string} Value of options is a path to find the actual value in vm

Returns {} A series of mixins

processEscapeStr2Value

src/index.js:54-54

process escape string to value with its data type

Parameters

  • str {string}

Returns (string | any | undefined | number)

processValue2EscapeStr

src/index.js:64-64

process value to escape string

Parameters

  • val {any}

Returns string

TODO

  • write demo

License

This project is licensed under the MIT license.

Keywords

js

FAQs

Package last updated on 22 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts