我想在Excel或.xls中導出Ext.Grid,但由於某些原因,它不會在Mac中獲取數據。該文件在Windows中以.xlt格式導出,不會在MS Office Excel中打開。雖然導出的文件在Ubuntu中導出並使用Libre打開時具有所有數據。Ext.ux.Exporter.Button無法使用ExtJS輸出excel數據
我使用的是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>
我在哪裏不正確?
」它不會在Mac中獲取數據「。這是什麼意思?一個空文件?下載的文件有多少個字節?它包含什麼? – Francesco