Hi
I currently have a list of servers on my database that I can download onto an Excel spreadsheet.
The code is as follows:
==============================
<%
Dim oRS
' Script generates CSV file for procurement scorecards
Response.Buffer = TRUE
Response.ContentType = "application/vnd.ms-excel"
'Write column headings
response.write "Server Name" & vbTab & "Site Code" & vbTab & "Serial Number" & vbTab & "Asset Number" & vbCrLf
'on error resume next
Set oRS = objConn.Execute("select Name_of_server,Site_Code,Serial_Number,Asset_Number from Products order by Name_of_Server" ' select statement for export
if err <> 0 Then response.write err.description :response.end
Do Until oRS.EOF
'Write out the fields seperated by tabs
response.write oRS("Name_of_server" & vbTab & oRS("Site_Code" & vbTab & oRS("Serial_Number" & vbTab &oRS("Asset_Number" & vbCrLf
oRS.MoveNext
Loop
oRS.Close(): Set oRS = Nothing
objConn.close: set objConn = nothing
%>
====================================
Unfortunately this only outputs the 4 stated fields.
I have multiple search fields on the database e.g Name_of_server, Site_Code, Domain, DNS_Server,Support_Status,Server_Type etc etc
and what I would like to do is have the option to either view my search criteria normally through my web page as I do at the moment or select to download my search criteria to an Excel spreadsheet.
I hope this makes sense.
Regards
Redcare
I currently have a list of servers on my database that I can download onto an Excel spreadsheet.
The code is as follows:
==============================
<%
Dim oRS
' Script generates CSV file for procurement scorecards
Response.Buffer = TRUE
Response.ContentType = "application/vnd.ms-excel"
'Write column headings
response.write "Server Name" & vbTab & "Site Code" & vbTab & "Serial Number" & vbTab & "Asset Number" & vbCrLf
'on error resume next
Set oRS = objConn.Execute("select Name_of_server,Site_Code,Serial_Number,Asset_Number from Products order by Name_of_Server" ' select statement for export
if err <> 0 Then response.write err.description :response.end
Do Until oRS.EOF
'Write out the fields seperated by tabs
response.write oRS("Name_of_server" & vbTab & oRS("Site_Code" & vbTab & oRS("Serial_Number" & vbTab &oRS("Asset_Number" & vbCrLf
oRS.MoveNext
Loop
oRS.Close(): Set oRS = Nothing
objConn.close: set objConn = nothing
%>
====================================
Unfortunately this only outputs the 4 stated fields.
I have multiple search fields on the database e.g Name_of_server, Site_Code, Domain, DNS_Server,Support_Status,Server_Type etc etc
and what I would like to do is have the option to either view my search criteria normally through my web page as I do at the moment or select to download my search criteria to an Excel spreadsheet.
I hope this makes sense.
Regards
Redcare