function AllAreaExcel(divname)
{
var oXL = null;
oXL = new ActiveXObject("Excel.Application");
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
var sel=document.body.createTextRange();
sel.moveToElementText(divname);
sel.select();
sel.execCommand("Copy");
oSheet.Paste();
oXL.Visible = true;
}
转载于:https://blog.51cto.com/4896955/860813