日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

domino从Excel导入数据

發布時間:2023/12/2 编程问答 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 domino从Excel导入数据 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

HTML部分
——————————————————————————————————————————————

1 <table style="WIDTH: 99%; BORDER-COLLAPSE: collapse" class="linkeytable"> 2 <tbody> 3 <tr> 4 <td width="15%" align="right">導入文件:</td> 5 <td width="35%"> 6 <input id="upfile" name="file" type="file" /></td> 7 </tr> 8 </tbody> 9 </table>

——————————————————————————————————————————————

JS部分
——————————————————————————————————————————————

1 function ImportTest(){ 2 var tempStr=""; 3 var filePath=document.all.upfile.value; 4 if(String(filePath)!=""){ 5 var oXL=new ActiveXObject("Excel.application"); 6 var oWB=oXL.Workbooks.open(filePath); 7 oWB.worksheets(1).select(); 8 var oSheet=oWB.ActiveSheet; 9 try{ 10 var i=2; 11 while(String(oSheet.Cells(i,1).value)!="undefined"){ 12 if(tempStr!="")tempStr+="#"; 13 tempStr+=oSheet.Cells(i,1).value+"#"; 14 tempStr+=oSheet.Cells(i,2).value+"#"; 15 tempStr+=oSheet.Cells(i,3).value+"#"; 16 tempStr+=oSheet.Cells(i,4).value+"#"; 17 tempStr+="CompanyAsset"; 18 i++; 19 } 20 } 21 catch(e){ 22 alert("Error"); 23 } 24 var url="/"+folder+"/app.nsf/WF_RunRule?openagent&RuleNum=RUh3c02001_004"; 25 $(function(){ 26 $.post(url,encodeURI(tempStr),function(){alert("導入成功");window.close();}); 27 }) 28 oWB.close(); 29 oXL.Quit(); 30 } 31 CollectGarbage(); 32 //window.close(); 33 opener.location.reload(); 34 }

——————————————————————————————————————————————

LS部分
——————————————————————————————————————————————

Sub Initialize
On Error Goto errormsg
dim se as new notessession
dim db as notesdatabase
dim curdoc as notesdocument
set db=opendb("app.nsf")
set curdoc=se.Documentcontext

dim strFormular as string
dim vData as variant
dim vQry as string
strFormular="@URLDecode('Domino';Request_Content)"
vData=Evaluate(strFormular,curdoc)
vQry=vData(0)

dim sql as string
dim vStr as variant
dim i as integer,j as integer
vStr=split(vQry,"#")
i=ubound(vStr)+1
j=i/5-1

dim WF_Document as notesdocument
dim fldlst as new lcfieldlist
dim tmpdoc as notesdocument
for k=0 to j?
sql=|select * from h3c_PropertyInfo where number='|+vStr(k*5)+|'|
set tmpdoc=rdb.GetDocumentBySql(sql)
set WF_Document=db.createdocument()
WF_Document.WF_OrUNID=WF_Document.universalid
WF_Document.number=vStr(k*5)
WF_Document.status=vStr(k*5+1)
WF_Document.place=vStr(k*5+2)
WF_Document.connectors=vStr(k*5+3)
WF_Document.genre=vStr(k*5+4)
if not tmpdoc is nothing then
Dim useTime As New NotesDateTime(Cstr(tmpdoc.getdate(0)))
dim dateTime as new notesdatetime("")
datetime.LSLocalTime=Now
WF_Document.type=tmpdoc.type(0)
WF_Document.storager=tmpdoc.storager(0)
WF_Document.storagernumber=tmpdoc.storagernumber(0)
WF_Document.dept=tmpdoc.dept(0)
WF_Document.deptnumber=tmpdoc.deptnumber(0)
WF_Document.getdate=useTime.DateOnly
WF_Document.attachments=tmpdoc.attachments(0)
WF_Document.buff="未調撥"
WF_Document.WF_DOCCREATED=datetime.LSLocalTime
WF_Document.WF_AddName=WF_UserName
end if
call rdb.saveDocument(WF_Document,"h3c02001_Estate")
next
msgbox "h3c02001:OK"
Exit Sub
errormsg:
Msgbox "Rule Error:" & Str(Erl) & " " & Error
End Sub

轉載于:https://www.cnblogs.com/guojian2080/archive/2013/04/19/3031080.html

總結

以上是生活随笔為你收集整理的domino从Excel导入数据的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。