<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>MzSpreadsheet</title><script language="VBScript">
</script><script language="JavaScript">
<!--var e;
function Spreadsheet_Setting() //电子表格的基本设置
{
e = document.all.MzSpreadsheet;
e.DataType = "HTMLData"; //指定表格数据源类型
e.HTMLData = document.all.data.innerHTML; //这句给控件一个数据源
e.DisplayColHeaders = 0; //列标题行
e.DisplayRowHeaders = 0; //行号列
//e.titlebar.Caption = "所存字典列表"; //电子表格标题
e.titlebar.visible = 1; //标题是否显示
e.displaytoolbar = 0; //工具栏是否显示 var c = e.Constants;
e.Range("c2").FreezePanes(c.ssFreezeTop); //冻结行
e.Range("c2").FreezePanes(c.ssFreezeLeft); //冻结列 e.Rows(1).Font.Bold = true;
e.Rows(1).Font.Color = "red";
e.Columns(1).Font.Bold = true; //e.width = document.body.clientWidth; //设置电子表格对象宽
//e.height = document.body.clientHeight-25; //设置电子表格对象高
//e.AutoFit = false; var ur = e.ActiveSheet.UsedRange;
ur.Font.size = "11";
ur.AutoFitRows();
ur.AutoFitColumns(); //自适应列宽显示 //e.Cells.Locked = True //e.Columns(1).Locked = true;
//e.Rows(1).Locked = true;
//e.ActiveSheet.Protection.Enabled = True //saveOldData()}
window.onload = function()
{
Spreadsheet_Setting();
}function save()
{
var e = document.all.MzSpreadsheet;
var ss= e.Constants;
e.ActiveSheet.Export("mm.xls", ss.ssExportActionNone);//, ss.SheetExportActionEnum
}
//-->
</SCRIPT></head>
<body style="overflow:hidden; margin: 0px">
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%">
<tr>
<td>
<OBJECT id=MzSpreadsheet height="100%" width="100%"
classid="clsid:0002E510-0000-0000-C000-000000000046">
<param name="DisplayColHeaders" value="-1">
<param name="DisplayGridlines" value="-1">
<param name="DisplayHorizontalScrollBar" value="-1">
<param name="DisplayRowHeaders" value="-1">
<param name="DisplayToolbar" value="0">
<param name="DisplayVerticalScrollBar" value="-1">
<param name="EnableAutoCalculate" value="-1">
<param name="EnableEvents" value="-1">
<param name="MoveAfterReturn" value="-1">
<param name="MoveAfterReturnDirection" value="0">
<param name="RightToLeft" value="0">
<param name="ViewableRange" value="1:65536"></OBJECT>
</td>
</tr>
<tr>
<td height=30>
<table width="100%" border=0 id=mytable>
<tr>
<td align=center><input type="button" name="b1" value=" 保存 " onclick="save()">
</tr>
</table>
<div id=data style="display: none">
<table border=1 width="100%">
<tr style="background-olor: blue">
<th>Serial_no</th>
<th>Sex_Code</th>
<th>Sex_Name</th>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>男</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td>女</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body></html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>MzSpreadsheet</title><script language="VBScript">
</script><script language="JavaScript">
<!--var e;
function Spreadsheet_Setting() //电子表格的基本设置
{
e = document.all.MzSpreadsheet;
e.DataType = "HTMLData"; //指定表格数据源类型
e.HTMLData = document.all.data.innerHTML; //这句给控件一个数据源
e.DisplayColHeaders = 0; //列标题行
e.DisplayRowHeaders = 0; //行号列
//e.titlebar.Caption = "所存字典列表"; //电子表格标题
e.titlebar.visible = 1; //标题是否显示
e.displaytoolbar = 0; //工具栏是否显示 var c = e.Constants;
e.Range("c2").FreezePanes(c.ssFreezeTop); //冻结行
e.Range("c2").FreezePanes(c.ssFreezeLeft); //冻结列 e.Rows(1).Font.Bold = true;
e.Rows(1).Font.Color = "red";
e.Columns(1).Font.Bold = true; //e.width = document.body.clientWidth; //设置电子表格对象宽
//e.height = document.body.clientHeight-25; //设置电子表格对象高
//e.AutoFit = false; var ur = e.ActiveSheet.UsedRange;
ur.Font.size = "11";
ur.AutoFitRows();
ur.AutoFitColumns(); //自适应列宽显示 //e.Cells.Locked = True //e.Columns(1).Locked = true;
//e.Rows(1).Locked = true;
//e.ActiveSheet.Protection.Enabled = True //saveOldData()}
window.onload = function()
{
Spreadsheet_Setting();
}function save()
{
var e = document.all.MzSpreadsheet;
var ss= e.Constants;
e.ActiveSheet.Export("mm.xls", ss.ssExportActionNone);//, ss.SheetExportActionEnum
}
//-->
</SCRIPT></head>
<body style="overflow:hidden; margin: 0px">
<table border=0 cellpadding=0 cellspacing=0 width="100%" height="100%">
<tr>
<td>
<OBJECT id=MzSpreadsheet height="100%" width="100%"
classid="clsid:0002E510-0000-0000-C000-000000000046">
<param name="DisplayColHeaders" value="-1">
<param name="DisplayGridlines" value="-1">
<param name="DisplayHorizontalScrollBar" value="-1">
<param name="DisplayRowHeaders" value="-1">
<param name="DisplayToolbar" value="0">
<param name="DisplayVerticalScrollBar" value="-1">
<param name="EnableAutoCalculate" value="-1">
<param name="EnableEvents" value="-1">
<param name="MoveAfterReturn" value="-1">
<param name="MoveAfterReturnDirection" value="0">
<param name="RightToLeft" value="0">
<param name="ViewableRange" value="1:65536"></OBJECT>
</td>
</tr>
<tr>
<td height=30>
<table width="100%" border=0 id=mytable>
<tr>
<td align=center><input type="button" name="b1" value=" 保存 " onclick="save()">
</tr>
</table>
<div id=data style="display: none">
<table border=1 width="100%">
<tr style="background-olor: blue">
<th>Serial_no</th>
<th>Sex_Code</th>
<th>Sex_Name</th>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>男</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td>女</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</body></html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货