搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Excel file not containing the whole html table when downloading

  • 1 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 Shadow110

more options

This is the code I am using in my jquery function

if (browser == "Firefox") {

               ////getting data from our div that contains the HTML table
               var data_type = 'data:application/vnd.ms-excel';
               var table_div = document.getElementById('div_Previewhtml');
               var table_html = table_div.outerHTML.replace(/ /g, '%20');
               var a = document.createElement('a');
               document.body.appendChild(a);
               ////setting the file name
               a.download = "Change" + MasterId + '.xls';
               a.href = data_type + ', ' + table_html;
               ////triggering the function
               a.click();
           }

But output excel is only half generated, what is wrong?

This is the code I am using in my jquery function if (browser == "Firefox") { ////getting data from our div that contains the HTML table var data_type = 'data:application/vnd.ms-excel'; var table_div = document.getElementById('div_Previewhtml'); var table_html = table_div.outerHTML.replace(/ /g, '%20'); var a = document.createElement('a'); document.body.appendChild(a); ////setting the file name a.download = "Change" + MasterId + '.xls'; a.href = data_type + ', ' + table_html; ////triggering the function a.click(); } But output excel is only half generated, what is wrong?

所有回覆 (1)

more options

HI, no idea : Since you are compiling code please see Stackoverflow.com for help with your code or google into github. This is beyond what Firefox Volunteer Support does.

Please let us know if this solved your issue or if need further assistance.