<%
' find the most current version of the ADODB.Connection
' and grab it's class ID using the RegRead function.
dim a
' name of the most current adodb.connection object
a = RegRead("HKCR\ADODB.Connection\CurVer\")
' read the ClsID of the current adodb.connection object
' and write it to the browser.
' (clsID can be used in the metadata tag to grab all
' the ado constants without explicitly declaring them)
response.write RegRead("HKCR\" & a & "\ClsID\") & "<BR>"
' check for the existence of the Excel.Application
' object (Indicates Microsoft Excel has been
' successfully installed on the server)
a = RegRead("HKCR\Excel.Application\")
If isNull(a) Then
' an error has occurred while trying to get the entry.
Response.Write "Excel.Application object not found on this server!"
Else
' check the version
' "Excel.Application.9" indicates MS Excel 2000
Response.Write RegRead("HKCR\Excel.Application\CurVer\")
' if a value is sent to the browser ("Excel.Application.version"),
' you can use the Excel object in your ASP pages to create
' and read spreadsheets!
End If
%>