
Urgent - Check the installation of EXCEL or EXCEL Viewer on Client
Fi
To my knowledge, no. I think you must do a regread and check on the result
(works for both the viewer and the full version of Excel), or do a
CreateObject("Excel.Application") (works only for the full version of Excel).
Note: If the Office version is 2000 or XP, you can also use the MSI object
(WindowsInstaller.Installer) to get/check installed features (eg. Excel).
Regards,
Torgeir
Quote:
> That's fine, but I thought that there must be a check like the check for a
> plugin, so that the Viewer is automatically installed if the test failed.
> So can you help me again ?
> Thanks
> Peter
> > Nice one... I was too lazy for this =)
> > > Yes, this will detect if full Excel is installed, but not the viewer
> > version.
> > > To detect the viewer version, you can do like this:
> > > sExcelCmd = RegRead ("HKCR\Excel.Sheet.8\shell\Open\command\")
> > > If InStr(1,sExcelCmd,"XLVIEW.EXE",vbTextCompare) > 0 Then
> > > WScript.Echo "Excel viewer is installed!"
> > > End If
> > > Function RegRead(sRegValue)
> > > Set oShell = CreateObject("WScript.Shell")
> > > On Error Resume Next
> > > RegRead = oShell.RegRead(sRegValue)
> > > ' If the value does not exist, error is raised
> > > If Err Then
> > > RegRead = ""
> > > Err.clear
> > > End if
> > > On Error Goto 0
> > > ' If a value is present but uninitialized the RegRead
> > > ' method returns the input value (Way to go MS!).
> > > If RegRead = sRegValue Then
> > > RegRead = ""
> > > End if
> > > End Function
> > > Regards,
> > > Torgeir
> > > > I think you could do something like this:
> > > > Function CheckExcel()
> > > > On Error Resume next
> > > > set xlObj = createObject("Excel.Application")
> > > > If IsObject(xlObj) then
> > > > CheckExcel = True
> > > > Else
> > > > CheckExcel = False
> > > > End if
> > > > End Function
> > > > So you get true if excel is installed and false if it isn't.
> > > > btw, the script must be run on the client-side.
> > > > Hope this helps...
> > > > > Hi all,
> > > > > please help me.
> > > > > How is it possible to check the existence of EXCEL or EXCEL-Viewer
> on
> > a
> > > > > client. I want to install EXCEL-Viewer if no full EXCEL-installation
> > > > exists
> > > > > and I want to do this from within an ASP script.
> > > > > Many thanks!
> > > > > Cheers
> > > > > Peter