new ActiveXObject("Excel.Application")的问题
请问Excel.Application 这一段在哪里查,
我现在装的Excel2003,这里该怎么写呢
我现在装的Excel2003,这里该怎么写呢
...全文
请发表友善的回复…
发表回复
陪你在路上 2010-07-05
- 打赏
- 举报
帮忙顶起 继续关注中。。。
yinkehao 2010-07-05
- 打赏
- 举报
这样用?你是想做甚么啊?
没看你打开Excel的操作啊?
没看你打开Excel的操作啊?
wangearn 2010-07-05
- 打赏
- 举报
try{
var oXL = new ActiveXObject("Excel.Application");
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
var sel=document.body.createTextRange();
sel.moveToElementText(obj);
sel.select();
sel.execCommand("Copy");
oSheet.Paste();
oSheet.Columns(1).ColumnWidth =3;
oSheet.Columns(2).ColumnWidth =15;
oSheet.Columns(3).ColumnWidth =20;
oSheet.Columns(4).ColumnWidth =3;
oSheet.Columns(5).ColumnWidth =50;
oSheet.Columns(6).ColumnWidth =4;
oSheet.Columns(7).ColumnWidth =15;
oSheet.Columns(8).ColumnWidth =5;
oSheet.Rows.AutoFit;
oSheet.Rows.Font.Size=8;
//oSheet.Rows.RowHeight = 30
//xlsSheet.Rows(2).WrapText=true; //自动换行
//oWB.ActiveSheet.Cells(row,col).WrapText=true;
oXL.Visible = true;
}catch(e){
alert("请确定已安装Excel2000(或更高版本)!");
return;
}
提示服务器不能创建对象
var oXL = new ActiveXObject("Excel.Application");
var oWB = oXL.Workbooks.Add();
var oSheet = oWB.ActiveSheet;
var sel=document.body.createTextRange();
sel.moveToElementText(obj);
sel.select();
sel.execCommand("Copy");
oSheet.Paste();
oSheet.Columns(1).ColumnWidth =3;
oSheet.Columns(2).ColumnWidth =15;
oSheet.Columns(3).ColumnWidth =20;
oSheet.Columns(4).ColumnWidth =3;
oSheet.Columns(5).ColumnWidth =50;
oSheet.Columns(6).ColumnWidth =4;
oSheet.Columns(7).ColumnWidth =15;
oSheet.Columns(8).ColumnWidth =5;
oSheet.Rows.AutoFit;
oSheet.Rows.Font.Size=8;
//oSheet.Rows.RowHeight = 30
//xlsSheet.Rows(2).WrapText=true; //自动换行
//oWB.ActiveSheet.Cells(row,col).WrapText=true;
oXL.Visible = true;
}catch(e){
alert("请确定已安装Excel2000(或更高版本)!");
return;
}
提示服务器不能创建对象
yinkehao 2010-07-05
- 打赏
- 举报
甚么错误啊?
我在公司,excel数据导入都以及写到公共资源库里面了,也就这样的
我在公司,excel数据导入都以及写到公共资源库里面了,也就这样的
wangearn 2010-07-05
- 打赏
- 举报
[Quote=引用 1 楼 yinkehao 的回复:]
这样不可以吗?
[/Quote]
要出错
这样不可以吗?
[/Quote]
要出错
yinkehao 2010-07-05
- 打赏
- 举报
这样不可以吗?