<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>
