摘要: 在用ADO读取Excel文件数据,常容易发生丢失数据的现象。例如,用ADO打开一个Excel文件的代码如下:Dim objConn As ADODB.Connection Dim objRS As ADODB.Recordset Dim objRSTable As ADODB.Recordset Set objConn = New ADODB.Connection Set objRS = New ADODB.Recordset objRS.CursorLocation = adUseClient With objConn .Provider = "Microsoft.Jet.OLED 阅读全文
posted @ 2012-02-24 16:27 testerZH 阅读(349) 评论(0) 推荐(0) 编辑
摘要: function selRandom(){ var objSelectd; var countOption; var indexSel; objSelectd = document.getElementById("id"); countOption = objSelectd.length; indexSel = Math.floor(Math.random()*countOption+1); objSelectd.value = objSelectd.options[indexSel].value;} 阅读全文
posted @ 2012-02-06 15:26 testerZH 阅读(228) 评论(0) 推荐(0) 编辑
摘要: Function CountDays(Date1,Date2) On Error Resume Next Err.Clear da1=Date1 da2=Date2 DT1=FormatDateTime(Date1,2) DT2=FormatDateTime(Date2,2) Dim countNum countNum=DateDiff("d",DT1,DT2) For i=da1 to da2 If weekday(i)=1 or we... 阅读全文
posted @ 2012-01-31 16:24 testerZH 阅读(206) 评论(0) 推荐(0) 编辑