Hướng dẫn excellentexport js - xuất sắc js

Export to Excel Export to CSV Export to CSV

Firefox

 ExcellentExport.convert[options, sheets];

 Options:
 {
    anchor: String or HTML Element,
    format: 'xlsx' or 'xls' or 'csv',
    filename: String,
    rtl: Use Right-to-left characters, boolean [optional]
 }

 Sheets must be an array of sheet configuration objects. Sheet description:
 [
    {
        name: 'Sheet 1', // Sheet name
        from: {
            table: String/Element, // Table ID or table element
            array: [...] // Array with the data. Array where each element is a row. Every row is an array of the cells.
        },
        removeColumns: [...], // Array of column indexes [from 0]
        filterRowFn: function[row] {return true}, // Function to decide which rows are returned
        fixValue: function[value, row, column] {return fixedValue} // Function to fix values, receiving value, row num, column num
        fixArray: function[array] {return array} // Function to manipulate the whole data array
        rtl: Use Right-to-left characters, boolean [optional]
        ...
    },
    {
        ...
    }, ...
]

Trình duyệt Chrome

Internet Explorer 11+

            fixValue: [value, row, col] => {
                let v = value.replace[/
/gi, "\n"]; let strippedString = v.replace[/[]+]>]/gi, ""]; return strippedString; }

Cài đặt

  • NPM
  • sợi
  • Bower

Trọng tải

yarn add excellentexport
0

Bao gồm tập lệnh trong HTML của bạn:

Bao gồm tập lệnh trong HTML của bạn bằng CDN:

yarn add excellentexport
1

Nhập ES6

yarn add excellentexport
2

Cách sử dụng

yarn add excellentexport
3

API

yarn add excellentexport
4

Bài Viết Liên Quan

Toplist mới

Bài mới nhất

Chủ Đề