Html中使用M$控件系列之OWC-数据透视表篇

发表于:2007-06-30来源:作者:点击数: 标签:
form name=form1 id=form1 input name=strFile id=strFile type=file数据表名:input name=strTName strTName type=textinput type=button name=btnRead id=btnRead value=Read Data onclick= VB SCRIPT:ReadData() /form br object id=PivotTable1 classid=CL
<form name="form1" id="form1">
<input name=strFile id=strFile type=file>数据表名:<input name=strTName strTName type=text><input type=button name="btnRead" id="btnRead" value="Read Data" onclick="VBSCRIPT:ReadData()">
</form>
<br>

<object id="PivotTable1" classid="CLSID:0002E520-0000-0000-C000-000000000046">

</object>
<script language="VBScript">
<!--
Sub ReadData()
strPath = document.form1.strFile.value
strName = document.form1.strTName.value
PivotTable1.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & _
"data source=" & strPath
‘’数据表名
PivotTable1.DataMember = strName
‘’展开
PivotTable1.ActiveView.AutoLayout
End Sub
-->
</script>

原文转自:http://www.ltesting.net