Solved

Using CREATEOBJECT() with Excel Starter

Posted on 2014-09-19
4
615 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 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA asking for a password 12 43
Excel Sheet Comparison Macros 16 68
Excel IF/OR formula not working. 8 71
How do "runtime modules" work in Excel? 6 51
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…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Viewers will learn how to find and create templates in Excel 2013.
Viewers will learn how to share Excel data with others from desktop Excel, as well as Excel Online via OneDrive, and embed an Excel file on a website.

733 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