| |

VerySource

 Forgot password?
 Register
Search
View: 700|Reply: 1

Urgent question about exporting Word or Excel? ? ?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 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

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-8-11 21:45:01
| Show all posts
Solve it yourself! !
Also share with you, because the security settings are high, just enable AX! ! !
Reply

Use magic Report

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

Points Rules

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

Quick Reply To Top Return to the list