%
Response.ContentType = "application/vnd.ms-excel"
%>
<%
Response.ContentType = "application/vnd.ms-excel"
set conntemp=server.createobject("adodb.connection")
cnpath="DBQ=" & server.mappath("/stevesmith/data/timesheet.mdb")
conntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath
set RS=conntemp.execute("select * from donut")
%>
<%
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' % Loop through Fields Names and print out the Field Names
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
j = 2 'row counter
For i = 0 to RS.Fields.Count - 1
%>
<% = RS(i).Name %> |
<% Next %>
IMEI (calculated) |
ICCID(calculated) |
<%
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' % Loop through rows, displaying each field
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Do While Not RS.EOF
%>
<% For i = 0 to RS.Fields.Count - 1
%>
<% = RS(i) %> |
<% Next %>
=b<%=j%>-c<%=j%>-d<%=j%> |
=d<%=j%>*e<%=j%> |
<%
RS.MoveNext
j = j + 1
Loop
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
' % Make sure to close the Result Set and the Connection object
' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
RS.Close
%>
Totals |
=SUM(B2:B6) |
=SUM(C2:C6) |
=SUM(D2:D6) |
n/a |
=SUM(F2:F6) |
=SUM(G2:G6) |
Paso uno
Usuario: UNIVE