Solved

embed a spreadsheet on foxpro form

Posted on 2010-11-08
12
1,264 Views
1 Endorsement
Last Modified: 2016-02-01
What's the best way to embed an ActiveX spreadsheet on to a FoxPro form?
I currently have office 2007 on my computer, and the ActiveX spreadsheet 11.0 is not working - I get a COM error when I try to insert it on to my form.

My goal is to be able to cut from excel and paste on to the FoxPro form, and then programatically work with the data.
1
Comment
Question by:esak2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +3
12 Comments
 
LVL 8

Expert Comment

by:mikegagnon
ID: 34086482
What is the exact error. I cannot reproduce that.
0
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 34086785
One of the solutions I use it copy from Excel itself and paste it on a grid in FoxPro.

I detect the Ctrl+V and parse _CLIPTEXT and fill the rows and the fields in the awaiting cursor accordingly and refresh the grid.

Sheets should also work if you put the OLE Object in the Form.

We need to know the error you are receiving to help you further.
0
 

Author Comment

by:esak2000
ID: 34087045
Hi CaptainCyril,

Thank you for your pasting to the grid suggestion. I prefer to use an OLE spreadsheet object.

The message that I'm receiving when I try to insert Microsoft Office Spreadsheet 11.0 OLE Object is the following:

OLE Error code 0x80040202: Unknown COM status code.

I wonder if it has to do with my using Office 2007

0
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 
LVL 27

Expert Comment

by:CaptainCyril
ID: 34087125
I was able to slap an Excel Sheet using OLE Control File Browse on a FoxPro Form and then ran the form and edited that sheet. I got the whole Ribbon from Excel 2007 inside and it's working fine.

I guess something is wrong with your computer.

Do you have two versions of Office installed? Did you upgrade from a previous version?
0
 

Author Comment

by:esak2000
ID: 34087161
I upgraded from Office 2003
0
 
LVL 42

Expert Comment

by:pcelba
ID: 34087608
What is your OS, VFP and DLL file version?

It is working fine for VFP 9.00.0000.7423 and OWC11.DLL 12.0.6502.5000 on Vista 32 bit PC.

Above DLL version is available here: http://support.microsoft.com/kb/947318

Many different versions of this control exist - here is also one newer than mine: http://support.microsoft.com/kb/968377

Most of the COM error are comming from invalid registration. You may try to unregister and register the DLL again.

You could also check access rights for the DLL and its folder (obviously C:\Program Files\Common Files\microsoft shared\Web Components\11)
1
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 34088069
I even have it working on the same config as Pavel's with 64-bit Vista Ultimate.

Have you tried it with administrator rights?
0
 
LVL 42

Accepted Solution

by:
pcelba earned 150 total points
ID: 34088169
I am in admin group but UAC is switched on and no confirmation was needed so I suppose the admin is not required.

The Office 2003 upgrade could be a problem - I remember some posts complaining to component mallfunctions... but who knows
0
 
LVL 27

Assisted Solution

by:CaptainCyril
CaptainCyril earned 150 total points
ID: 34090624
Office is unstable in its final release by itself. An upgrade would cause it to be even more unstable using double registry keys. Even if Office 2007 is uninstalled and then reinstalled might not fix the problem.

Maybe this helps:
http://blogs.msdn.com/b/calvin_hsia/archive/2007/04/05/why-doesn-t-microsoft-excel-spreadsheet-control-work.aspx

I did not understand it fully though!
0
 
LVL 29

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 100 total points
ID: 34100959
Office 2007 is not version 11. You seem to have a remaining partial COM object there that is actually not working anymore, as you moved from Office 2003.

Bye, Olaf.
0
 
LVL 42

Expert Comment

by:pcelba
ID: 34102313
These Web components were not developed together with Office.

Thus  OWC11.DLL is stored in C:\Program Files\Common Files\microsoft shared\Web Components\11 folder but its version is 12.xx.....  OWC12.DLL also exists somewhere... but not on my computer.

Office 2003 was never installed on my PC but the OWC11.DLL is there. I've installed Office 2007 only. And probably the Web components 2003 as a standalone product.

And Microsoft Office 2003 Web Components has Service Pack 1 (SP1) for the 2007 Microsoft Office System:
http://www.microsoft.com/downloads/en/details.aspx?familyid=C815DFFA-D5F3-4B71-BF46-13721BD44682&displaylang=en

This blog is also interesting: http://aspnetresources.com/blog/where_are_office_2007_web_components
0
 

Expert Comment

by:pandu_kusumawardhany
ID: 41443138
good question and good comment.

a few hours ago, i've had the problem when opened Microsoft Spreadsheet in My Fox Pro.

this article very useful
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
This article was originally published on Monitis Blog, you can check it  here .   Some years back, I worked as the CTO.  During my tenure, I had a head of IT support reporting to me.  He did his job quite well and had a commendable sense of duty…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question