ExtJS4.0导入本地Excel到界面中的grid,同时把数据保存到数据库
有没有这方面的代码参考一下,查了一些,目前还是毫无头绪啊,项目要求做个基础资料,其中有个功能,把本地的Excel文件导入到grid中,同时保存到数据库,前台用的是ExtJS4.0,后台是java,持久层Mybatis
<script src="/extjs-grid-dragdrop-excel/js/datadrop-plugin/Override.js"></script> <script src="/extjs-grid-dragdrop-excel/js/datadrop-plugin/Ext.ux.DataDrop.js"></script>
3 – Add “Ext.ux.grid.DataDrop” to your datagrid plugins declaration
// create grid var grid = new Ext.grid.GridPanel({ store: store, columns: [ {header: "NAME", width: 170, sortable: true, dataIndex: 'name'}, {header: "PHONE #", width: 150, sortable: true, dataIndex: 'phone'}, {header: "EMAIL", width: 150, sortable: true, dataIndex: 'email'}, {header: "BIRTHDAY", width: 100, sortable: true, dataIndex: 'birthday', renderer: Ext.util.Format.dateRenderer('m/d/Y')} ], plugins: [Ext.ux.grid.DataDrop], title: 'My Contacts', autoHeight:true, width:590, renderTo: document.body, frame:true});