javascript导出Excel

发表于: sitebuild | 作者: | 日期: 2009/3/16 08:03

导出格式不可控,但是使用简单,可解燃眉之急。


function export(){
var oXL = new ActiveXObject("Excel.Application");
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
var sel=document.body.createTextRange();
sel.moveToElementText(myTable);
sel.select();
sel.execCommand("Copy");
oSheet.Paste();
oXL.Visible = true;
}

: https://blog.darkmi.com/2009/03/16/795.html

本文相关评论 - 1条评论都没有呢
Post a comment now » 本文目前不可评论

No comments yet.

Sorry, the comment form is closed at this time.