| |

VerySource

 Forgot password?
 Register
Search
View: 6|Reply: 0

Urgent question about exporting Word or Excel? ? ?

[Copy link]

1

Threads

1

Posts

2

Credits

Newbie

Rank: 1

Credits
2

 China

Post time: 2020-3-8 19:00:02
| Show all posts |Read mode
Urgent question about exporting Word or Excel? ? ?

function AllAreaExcel ()
 {
  var oXL = new ActiveXObject ("Excel.Application");
  var oWB = oXL.Workbooks.Add ();
  var oSheet = oWB.ActiveSheet;
  var sel = document.body.createTextRange ();
  sel.moveToElementText (tableid);
  sel.select ();
  sel.execCommand ("Copy");
  oSheet.Paste ();
  oXL.Visible = true;
 }
Is this the exported code? ? ?
<Div id = tableid> in the program
..... what needs to be exported
</ div>

Different WEB systems, but one of them can be exported, but the other cannot be executed.
But after the installation, I had such a problem, can the master tell me why? ? ?

The following is the error prompt
Automation server cannot create objects
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list