<!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>
附,MSDN的帮助说明:
expression.Export(Filename, Action, Format)
expression An expression that returns a Spreadsheet object.
Filename Optional String. Specifies the file name of the saved file. If you do not specify this argument, a temporary file is created in the user's temporary folder (the location of the temporary folder varies by operating system). You must specify this argument if the Action argument is set to ssExportActionNone.