Solved

Using CREATEOBJECT() with Excel Starter

Posted on 2014-09-19
4
538 Views
Last Modified: 2014-09-21
I've got an application that normally outputs its reports to Excel.

It opens an instance of Excel by means of the function CREATEOBJECT("Excel.Application").

I have one user for whom this doesn't work - the function does not open an instance of Excel.

The system on which they are running the software does not have a full copy of Excel; instead it has a copy of Excel Starter.

Do I need to do something different with my CREATEOBJECT() function call - or is Excel Starter such a cut-down version of the product that what I am trying to do is impossible?
0
Comment
Question by:IainMacb
  • 2
  • 2
4 Comments
 
LVL 41

Accepted Solution

by:
pcelba earned 500 total points
ID: 40334542
Office starter version does not support OLE Automation so you cannot use CREATEOBJECT("Excel.Application").

The only solution is to install full desktop Excel version.

Also Office 365 running in a cloud does not allow automation from FoxPro. You have to install Office 2013 on your desktop instead. Fortunately, Office 2013 is included in some editions of Office 365.
0
 
LVL 1

Author Closing Comment

by:IainMacb
ID: 40334605
Well, that would explain what's going on! And thanks for the warning about Office 365.

Meanwhile, I do wish it was possible to find this out from M*cr*s*ft's own 'help' pages.
0
 
LVL 1

Author Comment

by:IainMacb
ID: 40335163
A further thought. Presumably I could try opening a copy of Excel at the start of my program and record whether this had worked into a global memory variable. Then close this copy, using .QUIT.

That way I could use the global memory variable to disable the output-to-Excel buttons that I have in my software.
0
 
LVL 41

Expert Comment

by:pcelba
ID: 40335536
Yes, this is possible. You just have to enclose the CREATEOBJECT() into TRY CATCH block to avoid possible error messages.

Another question is if this is necessary to do at the app start. You may do it later when user opens the form having Excel buttons implemented.

I would even say the always enabled button which tests the Excel object accessibility on each click is also good option because it does not consume resources at app start.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
Video by: Zack
Viewers will learn about using Excel in a browser with Excel Online.
Viewers will learn how to create a PivotTable and make basic changes to it in Excel 2013.

760 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now