473,548 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: check if excel installed

Hello,
I am using this code to display excel in IE.

locFilesPath = "D:\Files\myFil e.xls"
If (System.IO.File .Exists(locFile sPath)) Then
Response.Clear( )
Response.Conten tType = "Applicatio n/x-msexcel"
Response.WriteF ile(locFilesPat h)
Response.End()
End If

This does not work if remote computer does not have MS office installed. I
need to check if excel installed or not just before this code.
How should I do that?
Thanks,
Jim.
Nov 19 '05 #1
4 4430
First, if you are doing this on the server, you may not be able to tell if
the client has Excel installed. Nothing in your code snippet requires Excel
to be installed, but if the browser receives this byte stream, it will
probably prompt the user to save the file to disk.

"JIM.H." <JI**@discussio ns.microsoft.co m> wrote in message
news:63******** *************** ***********@mic rosoft.com...
Hello,
I am using this code to display excel in IE.

locFilesPath = "D:\Files\myFil e.xls"
If (System.IO.File .Exists(locFile sPath)) Then
Response.Clear( )
Response.Conten tType = "Applicatio n/x-msexcel"
Response.WriteF ile(locFilesPat h)
Response.End()
End If

This does not work if remote computer does not have MS office installed. I
need to check if excel installed or not just before this code.
How should I do that?
Thanks,
Jim.

Nov 19 '05 #2
yes it is prompting to the user to save. I need to get user see an error
message and not able to save it to the disk. can I do that?

"Peter Rilling" wrote:
First, if you are doing this on the server, you may not be able to tell if
the client has Excel installed. Nothing in your code snippet requires Excel
to be installed, but if the browser receives this byte stream, it will
probably prompt the user to save the file to disk.

"JIM.H." <JI**@discussio ns.microsoft.co m> wrote in message
news:63******** *************** ***********@mic rosoft.com...
Hello,
I am using this code to display excel in IE.

locFilesPath = "D:\Files\myFil e.xls"
If (System.IO.File .Exists(locFile sPath)) Then
Response.Clear( )
Response.Conten tType = "Applicatio n/x-msexcel"
Response.WriteF ile(locFilesPat h)
Response.End()
End If

This does not work if remote computer does not have MS office installed. I
need to check if excel installed or not just before this code.
How should I do that?
Thanks,
Jim.


Nov 19 '05 #3
You do not (by default) have the security permissions necessary to determine
if Excel is installed on the client's computer.
You'd need the user to adjust their browser security settings (so you can
try to instantiate Excel via client side script and trap the related error
if it's not installed) or you'd need some kind of a thick client such as an
ActiveX control.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"JIM.H." <JI**@discussio ns.microsoft.co m> wrote in message
news:63******** *************** ***********@mic rosoft.com...
Hello,
I am using this code to display excel in IE.

locFilesPath = "D:\Files\myFil e.xls"
If (System.IO.File .Exists(locFile sPath)) Then
Response.Clear( )
Response.Conten tType = "Applicatio n/x-msexcel"
Response.WriteF ile(locFilesPat h)
Response.End()
End If

This does not work if remote computer does not have MS office installed. I
need to check if excel installed or not just before this code.
How should I do that?
Thanks,
Jim.

Nov 19 '05 #4
Or just put a notice on the screen asking if they have Excel, if they click
no then dont let them download, if they dont and they click yes...user
error.

MattC
"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:ue******** ******@TK2MSFTN GP11.phx.gbl...
You do not (by default) have the security permissions necessary to
determine if Excel is installed on the client's computer.
You'd need the user to adjust their browser security settings (so you can
try to instantiate Excel via client side script and trap the related error
if it's not installed) or you'd need some kind of a thick client such as
an ActiveX control.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net

"JIM.H." <JI**@discussio ns.microsoft.co m> wrote in message
news:63******** *************** ***********@mic rosoft.com...
Hello,
I am using this code to display excel in IE.

locFilesPath = "D:\Files\myFil e.xls"
If (System.IO.File .Exists(locFile sPath)) Then
Response.Clear( )
Response.Conten tType = "Applicatio n/x-msexcel"
Response.WriteF ile(locFilesPat h)
Response.End()
End If

This does not work if remote computer does not have MS office installed.
I
need to check if excel installed or not just before this code.
How should I do that?
Thanks,
Jim.


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
5085
by: deko | last post by:
I'm trying to create an MSI in VS.NET that will check for installed Office System components - so my MDE will only install if requirements are met. I'm thinking about using VBScript to inspect Registry keys/values. Anyone travel this road before? Other suggestions? Thanks in advance.
2
2831
by: Maik | last post by:
Hi everybody, I want to automate an Excel97 application using C#. I use the excel8.olb file as COM interface. How can I check the country code of the installed Excel application? I know that there is a method "LanguageSettings.get_LanguageID()", but it works with Excel XP. regards, Maik
7
3370
by: Alain \Mbuna\ | last post by:
Hi everybody. Does anyone know what code I should use to check for the version number of Excel, installed on a computer? Thanks. Alain.
4
1904
by: zacks | last post by:
I have an application that can read an Excel spreadsheet on a computer that doesn't have Excel installed on using the Jet ODBC 4.0 driver. I know need to modify the application to also be able to create a new Excel spreadsheet and write data to it on the same computer, a computer that does not have Excel, or even Office installed. I have...
0
7444
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7711
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7467
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5367
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5085
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3478
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
755
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.