我正在尝试在 excel 或 .xls 中导出 Ext.Grid,但由于某种原因,它不会在 Mac 中获取数据。该文件在 Windows 中以 .xlt 格式导出,不会在 MS Office excel 中打开。虽然导出的文件在 Ubuntu 中导出并使用 Libre 打开时包含所有数据。
我正在使用 github 中提供的Ext.ux.Exporter。该文件是执行所有工作的 Exporter-all.js。我真的很困惑我哪里错了?
这是excel导出按钮上的代码,
var grid = new Ext.grid.GridPanel({
title: "Intersected Species Info",
store: stor,
width: 585,
height: 260,
stripeRows: true,
tbar: [],
columns: columns,
listeners: {
render: function (grid) {
grid.getSelectionModel().selectFirstRow();
}
}
});
var exportCSV = new Ext.ux.Exporter.Button({
component: grid,
text: 'Download CSV'
});
grid.getTopToolbar().add(exportCSV);
这是我导入 js 文件的地方,
<script src="../exporter/Exporter-all.js" type="text/javascript"></script>
我哪里不对?