Thread Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: Roopa Arun

Date: 2 May, 2007 07:03:54

Message: 1 of 9

HI,

I am using a lot of embedded ActiveX spreadsheet OWC11.Spreadsheet.11
(excel 2003) in my program. When newer version of excel comes, what
happens to my program that used excel 2003.

Is there a way to generalize and ask my program to pick up any
version of excel installed on the computer ?

Thanks..
Roopa

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: Tom Clark

Date: 3 May, 2007 17:18:30

Message: 2 of 9

Roopa,

Your program won't suddenly stop working... the old activex control
will probably remain installed on your system. If you are doing a
complete reinstall (e.g upgrading to vista), you can probably
download the OCW11 control (from Microsoft KBase, I think... I
remember downloading it myself before) and install that in addition
to any more recent version. That should make your GUIs work fine
again.

I think it'd be a manual job to update for a different version of the
activex control: The only way I could think of using different
activex controls is by somehow calling your GUI passing a variable
indicating the control you want to use then having the creation
function initialise it. This is a minefield though- check the
functions of properties (other than maybe the really basic ones)
carefully.

Hope this helps

Tom Clark

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: Yair Altman

Date: 3 May, 2007 17:40:17

Message: 3 of 9

I had this exact problem some months ago, when switching from a PC
that had Office XP to 2003 (or vice versa - I forget).

My solution was to start with n=15 (I figured this will hold until
Office 2015 or so) and search for OWCn.Spreadsheet.n all the way down
until you hit one that exists - this works all the way down to OWC9
or 8, when Microsoft apparently modified their naming conventions...

The bigger problem turned out to be that Microsoft has a very bad
habit of significantly changing their API between versions. Depending
on your specific needs this problem might be small or insurmountable.

Yair Altman

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: Roopa Arun

Date: 4 May, 2007 07:17:19

Message: 4 of 9

Tom Clark wrote:
>
>
> Roopa,
>
> Your program won't suddenly stop working... the old activex control
> will probably remain installed on your system. If you are doing a
> complete reinstall (e.g upgrading to vista), you can probably
> download the OCW11 control (from Microsoft KBase, I think... I
> remember downloading it myself before) and install that in addition
> to any more recent version. That should make your GUIs work fine
> again.
>
> I think it'd be a manual job to update for a different version of
> the
> activex control: The only way I could think of using different
> activex controls is by somehow calling your GUI passing a variable
> indicating the control you want to use then having the creation
> function initialise it. This is a minefield though- check the
> functions of properties (other than maybe the really basic ones)
> carefully.
>
> Hope this helps
>
> Tom Clark

Thanks Tom, I found a owc11.exe which is 'Office 2003 Add-in: Office
Web Components' is that what you are talking of ? But this seems to
allow spreadsheet in view-only mode ? I want to be able to write onto
spreadsheets as well.. am I looking at the wrong component here. The
link is -

 <http://www.microsoft.com/downloads/details.aspx?familyid=7287252C-402E-4F72-97A5-E0FD290D4B76&displaylang=en>


 
Roopa

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: Roopa Arun

Date: 4 May, 2007 07:27:24

Message: 5 of 9

Yair Altman wrote:
>
>
> I had this exact problem some months ago, when switching from a PC
> that had Office XP to 2003 (or vice versa - I forget).
>
> My solution was to start with n=15 (I figured this will hold until
> Office 2015 or so) and search for OWCn.Spreadsheet.n all the way
> down
> until you hit one that exists - this works all the way down to OWC9
> or 8, when Microsoft apparently modified their naming
> conventions...
>
> The bigger problem turned out to be that Microsoft has a very bad
> habit of significantly changing their API between versions.
> Depending
> on your specific needs this problem might be small or
> insurmountable.
>
> Yair Altman
  
The owc11 is hardcoded in the gui when I created. How can I change it
to n ?

Do you mean that we can check which owc is installed on the machine
and use that in our program ?

Roopa

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: Yair Altman

Date: 4 May, 2007 10:23:33

Message: 6 of 9

Roopa -

1. Yes - the ActiveX is indeed called Web Component, and it
automatically becomes read-only unless you have Office installed.

2. I meant something like the following code:

% Try to select the latest possible ActiveX component
version = 15;
foundFlag = 0;
while ~foundFlag && (version > 9)
   try
      verStr = num2str(version);
      actxNameStr = ['OWC' verStr '.Spreadsheet.' verStr];
      [hActiveX, hContainer] = actxcontrol(actxNameStr);
      foundFlag = 1;
   catch
      version = version - 1;
   end
end
if ~foundFlag
   error('...');
end

3. Note: for help: <http://msdn2.microsoft.com/en-us/library/microsoft.office.tools.excel.aspx>

4. The ActiveX requires:
C:\PROGRA~1\COMMON~1\MICROS~1\WEBCOM~1\##\OWC##.DLL (## =
9/10/11/...)

Yair Altman

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: lili

Date: 15 May, 2007 10:11:18

Message: 7 of 9

Hi Yair,

After I intalled Office 2003 with OWC, is it possible to use
Spreadsheet Control on the web page for user input and then write
back to server-side SQL server database? I'm not sure of the
functionalities of Spreadsheet Control. Thanks!

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: Yair Altman

Date: 15 May, 2007 11:26:55

Message: 8 of 9

I'm not sure this is a Matlab question. As far as I know, OWC is
meant to be a read/view only web component, not a data entry one. But
I'm not sure about this. You'll probably find better answers on MS
Office-related forums, not this one.

Yair Altman

Subject: ActiveX spreadsheet OWC11.Spreadsheet.11

From: Tom Clark

Date: 15 May, 2007 11:41:55

Message: 9 of 9

> I'm not sure this is a Matlab question. As far as I know, OWC is
meant to be a read/view only web component, not a data entry one.

The one downloadable from Microsoft Knowledge base is view only. In
order to edit, you have to have the full control, which comes with
Microsoft Office. (i.e. you need microsoft office installed on your
machine). Although, I did see the read and write version of the
control at other download sites, but I'm not sure whether it's legal
or not.

Kind regards

Tom Clark

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com