求助:javascript操作owc的问题
在javascript中操作owc,赋值,展示都没问题,到最后导出为excel文件时,并非按帮助说中的,导出指定文件名的文件。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<input type="button" value="导出" onclick="exp()">
<OBJECT classid=clsid:0002E551-0000-0000-C000-000000000046 id=Spreadsheet1 style="width:100%;HEIGHT:95%">
</OBJECT>
</HTML>
<script>
Spreadsheet1.activesheet.range("a1").value = "水泥产量";
Spreadsheet1.activesheet.range("a2").value = 1;
Spreadsheet1.activesheet.range("b2").value = 2;
Spreadsheet1.activesheet.range("b3").value = 3;
function exp(){
Spreadsheet1.Export("d:\\a.xls");
}
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<input type="button" value="导出" onclick="exp()">
<OBJECT classid=clsid:0002E551-0000-0000-C000-000000000046 id=Spreadsheet1 style="width:100%;HEIGHT:95%">
</OBJECT>
</HTML>
<script>
Spreadsheet1.activesheet.range("a1").value = "水泥产量";
Spreadsheet1.activesheet.range("a2").value = 1;
Spreadsheet1.activesheet.range("b2").value = 2;
Spreadsheet1.activesheet.range("b3").value = 3;
function exp(){
Spreadsheet1.Export("d:\\a.xls");
alert('导出完毕');
}
</script>