Urgent - Check the installation of EXCEL or EXCEL Viewer on Client 
Author Message
 Urgent - Check the installation of EXCEL or EXCEL Viewer on Client

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



Mon, 22 Mar 2004 17:58:30 GMT  
 Urgent - Check the installation of EXCEL or EXCEL Viewer on Client
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...



Quote:
> 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



Mon, 22 Mar 2004 21:57:30 GMT  
 Urgent - Check the installation of EXCEL or EXCEL Viewer on Client
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

Quote:

> 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



Tue, 23 Mar 2004 00:02:49 GMT  
 Urgent - Check the installation of EXCEL or EXCEL Viewer on Client
Nice one... I was too lazy for this  =)



Quote:
> 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



Tue, 23 Mar 2004 00:46:11 GMT  
 Urgent - Check the installation of EXCEL or EXCEL Viewer on Client
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


Quote:
> 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



Tue, 23 Mar 2004 01:16:47 GMT  
 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



Tue, 23 Mar 2004 02:09:20 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Urgent - Check the installation of EXCEL or EXCEL Viewer on Client

2. Is this doable: drive Excel in VB without Excel installation

3. Distributing excel reference to client that doesnt have excel

4. REMPLIR UN CONTROL FEUILLE EXCEL DANS UN FORMULAIRE URGENT URGENT URGENT

5. Control feuille Excel dans un Formulaire URGENT URGENT URGENT

6. URGENT Printing using an Excel Object

7. Urgent! How to join excel with database

8. URGENT - Printing an Excel sheet

9. Word/Excel Viewers

10. Excel Viewer in Webbrowser control

11. Problem exporting to Excel through Report Viewer Active-X plug-in

12. open doc/excel file in frame with Word/Excel menubar

 

 
Powered by phpBB® Forum Software