# vue-3-export-excel

> export excel

Latest version **1.0.8** (published 2022-12-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-3-export-excel
pnpm add vue-3-export-excel
yarn add vue-3-export-excel
bun add vue-3-export-excel
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2022-12-02 |
| First published | 2022-12-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | chiempt |
| Keywords | vue, vue3, vue3, export, excel, excel, csv, json, json, to, export, excel, download |

## Links

- npm: https://www.npmjs.com/package/vue-3-export-excel
- Repository: https://github.com/chiempt/vue-3-export-excel
- Homepage: https://github.com/chiempt/vue-3-export-excel#readme
- Issues: https://github.com/chiempt/vue-3-export-excel/issues
- npm.io page: https://npm.io/package/vue-3-export-excel

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.8 (latest) — 2022-12-02
- 1.0.6 — 2022-12-02
- 1.0.5 — 2022-12-02
- 1.0.3 — 2022-12-02
- 1.0.2 — 2022-12-02
- 1.0.1 — 2022-12-02
- 1.0.0 — 2022-12-01

## README

# Vue export excel

Download excel file from json data

## Get Started (Bắt đầu)

```npm i vue-3-export-excel```

## How to use the library in vue (Cách sử dụng thư viện trong vue)

``` 
import { createApp } from 'vue'
import ExportExcel from 'vue-3-export-excel'
const app = createApp(App)
app.use(ExportExcel) 
```

## Example (Ví dụ)

```vue

<template>
  <export-excel
      :data="dataExcel"
      :fields="excelFields"
      :title="`Thông tin cá nhân`"
      :name="`Thong_tin_ca_nhan_pham_the_chiem.xls`">
    <button>Download Excel</button>
  </export-excel>
</template>
<script lang="ts" setup>
const excelFields = {
  'Tên': 'name',
  'Tên đăng nhập': 'userName',
  'Ngày sinh': 'birthDay',
  'Số điện thoại': 'phoneNumber',
  'Địa chỉ': 'address',
  'Địa chỉ facebook': 'facebook'
}
const dataExcel = [
  {
    name: 'Phạm Thế Chiêm',
    userName: 'chiempt',
    birthDay: '27/09/1999',
    phoneNumber: '0345361887',
    address: 'Hoài Đức - Hà Nội',
    facebook: 'https://www.facebook.com/chiem.dieu.18/'
  }
]
</script>
```

### Props

```js
  headerColor: {
      type: String,
      default: '#205737'
      description: 'Màu header'
    },
    disabled: {
      type: Boolean,
      default: false,
      description: 'Không cho phép xuất excel'
    },
    type: {
      type: String,
      default: 'xls',
      description: 'Địng dạng xuất file'
    },
    data: {
      type: Array,
      required: false,
      default: null,
      description: 'Dữ liệu table excel'
    },
    fields: {
      type: Object,
      required: false,
       description: 'Định nghĩa các trường trong table'
    },
    title: {
      default: null,
       description: 'Tiêu đề excel'
    },
    name: {
      type: String,
      default: 'file_excel.xls',
      description: 'Tên file'
    }

---
_Source: https://npm.io/package/vue-3-export-excel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
