?
Solved

Using CREATEOBJECT() with Excel Starter

Posted on 2014-09-19
4
Medium Priority
?
688 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
[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
  • 2
  • 2
4 Comments
 
LVL 42

Accepted Solution

by:
pcelba earned 2000 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 42

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

Basic Security of Your VPC

So, you’ve got this shiny new VPC and a fancy new application configured on your EC2 servers ready to go. This application is only accessible from your computer, which is great for security, but you need your users to be able to access it! So, what’s the easiest way to do this?

Question has a verified solution.

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

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…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Viewers will learn how to apply various conditional formatting in Excel 2013.
Viewers will learn how to customize the ribbon and quick access toolbar in Excel 2013.

764 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