1.0.3 • Published 3 years ago

js_table2excel_imgnottip_du v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

table2excel

text and image save to excel Fixed js_table2Excel prompt problem: original when there is no picture in the data, there will be an error prompt picture, after the modification will cancel the prompt

Installation

npm install js_table2excel_imgNotTip_du

Usage

import table2excel from 'js-table2excel'

const column = [
	{
		title: 'Name',
		key: 'name',
		type: 'text'
	},
	{
		title: 'Pic',
		key: 'pic',
		type: 'image',
		width: 80,
		height: 50
	}
]
const data = [
	{
		name: 'xiao',
		age: '18',
		pic: ''
	},
	{
		name: 'jie',
		age: '18',
		pic: ''
	}
]
const excelName = 'boy'

table2excel(column, data, excelName)

Introduction

  • title: name for column

  • key: key for column

  • type:

text: defalut
image: only accept start with http or https, and it can set image width and height
1.0.3

3 years ago