Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OWC 9 vs. OWC 11

16 views
Skip to first unread message

jmv

unread,
Mar 2, 2004, 1:56:07 PM3/2/04
to
I have a .NET application where I use the OWC Spreadsheet client side control.

My code works beautifully with OWC 9.

Now my requirement is to add functionality if the user has OWC 11.

If the user has version 11 then the HTML for that object is displayed
otherwise if the user has version 9 then the HTML object for version 9 is displayed.
If the user has neither then an error is displayed.

Two questions:

1. How do i determine version (javascript)?

2. What do I use for FREEZEPanes in version 11.

Thanks,

jmv

Alvin Bruney [MVP]

unread,
Mar 2, 2004, 3:46:42 PM3/2/04
to
http://devel.odessi.net/dotnet/OWC/Code/Sniffer.htm for a sniffer routine.
have a look at this website for more info
http://tinyurl.com/3he3b
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"jmv" <anon...@discussions.microsoft.com> wrote in message
news:13773305-D88E-4401...@microsoft.com...

jmv

unread,
Mar 4, 2004, 7:51:05 AM3/4/04
to
I need to determine which version the client has installed so that I can make sure the correct version is getting used.

Is there a way to determine the OWC version on the client without using the registry?

What I am currently doing is having the HTML for the OWC 11 already on the page. When I go to access it (say change the caption) if it fails then I use document.write to output the HTML for the OWC 9 version.

The problems I have with this is that there is, when there is no OWC 11 installed, I get a blank square where the OWC 11 control should be. Also, my code that is used to modify the control values does not seem to recognize the created OWC 9 object.

Thanks again for your help,

jmv

jmv

unread,
Mar 4, 2004, 12:51:08 PM3/4/04
to
OK I solved the problem with the following two functions and hidden field owcversion:

function CheckForOWCVersion9()
{
document.thisForm.owcversion.value = "-1";
try
{
var xObj9 = new ActiveXObject("OWC.Spreadsheet");
if (xObj9==null)
{
document.thisForm.owcversion.value = "-1";
}
else
{
document.thisForm.owcversion.value = "9";
}
}
catch (ex)
{
document.thisForm.owcversion.value = "-1";
}
}

function CheckOWCVersion()
{
document.thisForm.owcversion.value = "-1";

try
{
var xObj11 = new ActiveXObject("OWC11.Spreadsheet");
if (xObj11==null)
{
CheckForOWCVersion9();
}
else
{
document.thisForm.owcversion.value = "11";
}
}
catch (e)
{
CheckForOWCVersion9();
}
}

0 new messages