当超过2000行时,在导出excel文件中面临问题

时间:2017-08-17 09:24:04

标签: php codeigniter

我使用了这个功能

function fnDownloadExcelForReceivingReport() {

   var tab_text = $("#Reporting_container").html();
   var ua = window.navigator.userAgent;
   var msie = ua.indexOf("MSIE ");
   if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./))   {   // If Internet Explorer
            txtArea1.document.open("txt/html", "replace");
            txtArea1.document.write(tab_text);
            txtArea1.document.close();
            txtArea1.focus();
            sa = txtArea1.document.execCommand("SaveAs", true, "Say Thanks to Sumit.xls");
   }
   else //other browser not tested on IE 11
   sa = window.open('data:application/vnd.ms-excel,' + encodeURIComponent(tab_text));
   return (sa);
}

0 个答案:

没有答案