domino 엑셀 에서 데이터 가 져 오기

8593 단어
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 InitializeOn Error Goto errormsgdim se as new notessessiondim db as notesdatabasedim curdoc as notesdocumentset db=opendb("app.nsf")set curdoc=se.Documentcontext
dim strFormular as stringdim vData as variantdim vQry as string strFormular="@URLDecode('Domino';Request_Content)"vData=Evaluate(strFormular,curdoc)vQry=vData(0) dim sql as stringdim vStr as variantdim i as integer,j as integervStr=split(vQry,"#")i=ubound(vStr)+1j=i/5-1dim WF_Document as notesdocumentdim fldlst as new lcfieldlistdim tmpdoc as notesdocumentfor 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.universalidWF_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 thenDim useTime As New NotesDateTime(Cstr(tmpdoc.getdate(0)))dim dateTime as new notesdatetime("")datetime.LSLocalTime=NowWF_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.DateOnlyWF_Document.attachments=tmpdoc.attachments(0)WF_Document. buff = "호출 되 지 않 음" WFDocument.WF_DOCCREATED=datetime.LSLocalTimeWF_Document.WF_AddName=WF_UserNameend ifcall rdb.saveDocument(WF_Document,"h3c02001_Estate")nextmsgbox "h3c02001:OK"Exit Suberrormsg:Msgbox "Rule Error:" & Str(Erl) & " " & ErrorEnd Sub
다음으로 전송:https://www.cnblogs.com/guojian2080/archive/2013/04/19/3031080.html

좋은 웹페이지 즐겨찾기