Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have found this website closer to what I am looking for: I really need your help:

 

Can anybody on this forum give me examples or suggestions for applying this Spreadsheet control or OWC embedding -

I am open to receiving example suggestions in any language at this point...

 

What I am looking for- is basically embedding it into MFC app. in a dialog (I have come this far with some simple manipulations, I am able to control this control)

1. display data cell by cell-

2. enable some cells for users to enter and

3. enable some features of copy-paste as in Excel but a grid like view is what is needed.

 

Your help is greatly appreciated.

Posted

I don't have much experience with the OWC controls, myself. They are very good looking controls, but my understanding is there might be compatiblity issues. For example, I'm not sure that if you build to version 10.0 that your code will run if the client has 11.0 installed. (I've not tested this myself, but is what I've heard, so you should test this yourself before committing to too much code here.)

 

In general the OWC controls are being phased out (there will be not 12.0 version, for example), but Microsoft has committed to a 10 year support cycle, so I think it's fine to use them, so long as the compatiblity issue I mentioned is ok.

 

I don't know of any tutorials here. I tried Google with weak results. But put some effort in and one should be able to find something somewhere I would think?

 

You are using MFC, so I guess using C++ here? I don't know a thing about C++ and MFC, but in C# or VB.NET you could place the control on your form and the Interop seems to work just fine.

 

The commands are pretty basic, using IntelliSense, you should be able to quickly find commands such as:

Imports Microsoft.Office.Interop 
'...
'...
Me.AxSpreadsheet1.ActiveCell.Value = "Hello"
Me.AxSpreadsheet1.Range("A1").Value = 99
CType(Me.AxSpreadsheet1.Cells(2, 2), Owc11.Range).Value = "New Value"

In C# you'd use 'This' instead of 'Me' and 'Using' instead of 'Imports'.

 

As for enabling vs. locking certain cells, you can right-click on the OWC Spreadsheet while in design mode and then choose 'Commands & Options...'. Within that you'll find all kinds of usful settings.

 

I hope that this gets you going!

 

:),

Mike

Posting Guidelines

 

Avatar by Lebb

Posted

MFC-OWC interaction.

 

Thanks Mike for the prompt reply.

I did find your reply useful. Switched to VB environment and found that it is easy to use in VB.NET. We however may have license and compatibility issues with Office and its web components to be installed at client 's machines for this program. So, we are planning to go with Farpoint's spread which only needs a design time license and nothing else - with a huge documentation on its usage in C++ environment.

 

I found the VB code worked for me but using same to similar code in MFC did not work for me. I was able to send data to the control but changing color was not intuitive from C++. Overall, I thought Active-X controls are supposed to be plug-n-play unfortunately they are in some languages of MS and not others with zero documentation on its usage except in VB, I am not impressed.

 

Thanks for your help. Mike.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...