gpt4 book ai didi

javascript - 我正在使用 calrketm/TableExport ,为什么没有显示 xlsx 按钮?

转载 作者:行者123 更新时间:2023-11-29 19:06:41 25 4
gpt4 key购买 nike

我需要将 html 表格数据导出到 xlsx。我在 github 上使用 calrketm/TableExport...但是,我看不到导出到 Xlsx 按钮。我应该怎么办?这是 output

最佳答案

这是因为默认情况下不包括“xlsx”。请参阅下面的默认值:

$("table").tableExport({
headings: true, // (Boolean), display table headings (th/td elements) in the <thead>
footers: true, // (Boolean), display table footers (th/td elements) in the <tfoot>
formats: ["xls", "csv", "txt"], // (String[]), filetype(s) for the export
fileName: "id", // (id, String), filename for the downloaded file
bootstrap: true, // (Boolean), style buttons using bootstrap
position: "bottom", // (top, bottom), position of the caption element relative to table
ignoreRows: null, // (Number, Number[]), row indices to exclude from the exported file
ignoreCols: null, // (Number, Number[]), column indices to exclude from the exported file
ignoreCSS: ".tableexport-ignore", // (selector, selector[]), selector(s) to exclude cells from the exported file
emptyCSS: ".tableexport-empty", // (selector, selector[]), selector(s) to replace cells with an empty string in the exported file
trimWhitespace: false // (Boolean), remove all leading/trailing newlines, spaces (including non-breaking spaces), and tabs from cell text
});

要包含“xlsx”,您应该提供以下配置。

$("table").tableExport({
formats: ["xls", "csv", "txt", "xlsx"]
});

关于javascript - 我正在使用 calrketm/TableExport ,为什么没有显示 xlsx 按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42338646/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com