ie浏览器Ext Grid导出到Excel中文乱码问题,请大侠指教
导出到excel,火狐正常,ie导出正常只是中文乱码,我网上查了一些没解决问题,哪位大侠帮帮?
var vExportContent = _grid.getExcelXml();
if (Ext.isIE6 || Ext.isIE7 || Ext.isIE8 || Ext.isIE9 || Ext.isSafari || Ext.isSafari2 || Ext.isSafari3) {
var fd=Ext.get('frmDummy');
if (!fd) {
fd=Ext.DomHelper.append(Ext.getBody(),{tag:'form',method:'post',id:'frmDummy',action:'exportexcel.jsp', target:'_blank',name:'frmDummy',cls:'x-hidden',cn:[
//{tag:'input',name:'fileName',id:'fileName',type:'hidden'},
{tag:'input',name:'exportContent',id:'exportContent',type:'hidden'}
]},true);
}
//fd.child('#fileName').set({value:fileName});
fd.child('#exportContent').set({value:vExportContent});
fd.dom.submit();
} else {//火狐
document.location = 'data:application/vnd.ms-excel;base64,' + Base64.encode(vExportContent);
}
------解决方案--------------------
这个没玩过,只用过vba,帮你顶一下
------解决方案--------------------
<heade><meta http-equiv="Content-Type" content="text/html; charset=gb2312"/></heade>