http://jupiter0410.tistory.com/2

<%
02.excelFile = "D:\home\test2.xls"
03.excelConn="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & excelFile & "; Mode=ReadWrite|Share Deny None; Extended Properties='Excel 8.0;HDR=YES;';Persist Security Info=False"
04. 
05.Set excelDB = Server.CreateObject("ADODB.Connection")
06.excelDB.Open excelConn
07. 
08.' 첫번째 있는 Sheet1$ 시트 Select
09.sql = "SELECT * FROM [Sheet1$]"
10.Set excelRS = excelDB.Execute(sql)
11. 
12.response.write "
13."
14.Do until excelRS.EOF
15. 
16.' DB 저장 작업
17. 
18. 
19. 
20.' 임시 결과물을 보기 위한 출력
21.title = Trim(excelRs(0))
22.Select Case title
23.Case "농협서울"
24.For i = 0 To 8
25.If i = 0 Then response.write "
26."
27.If excelRs(i) = "" Then
28.response.write "
29."
30.else
31.response.write "
32."
33.End if
34.If i = 8 Then response.write "
35."
36.Next
37.End Select
38.excelRs.movenext
39.Loop
40. 
41.Set excelRs = Nothing
42.excelDB.Close
43.Set excelDB = Nothing
44.response.write "<table 1="" border="1">
45.<tbody><tr>
46.<td>작업장명</td>
47.<td>돈피(성별)</td>
48.<td>등급</td>
49.<td>경락두수</td>
50.<td>비율(%)</td>
51.<td>지율증량</td>
52.<td>최고가(원)</td>
53.<td>최저가(원)</td>
54.<td>평균(원)</td>
55.</tr><tr><td>빈칸</td><td>"& excelRs(i) & "</td></tr></tbody></table>
56."
57.%>

+ Recent posts