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
Solved

Using CREATEOBJECT() with Excel Starter

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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create a drop-down list in Excel 9 45
view results of google SQL query 9 65
MS Excel: Conditional formatting with a time delay 7 65
help with an excel problem 10 36
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 the basics of using filtering and sorting in Excel 2013.
Video by: Zack
Viewers will learn the basics of using Excel Tables, the benefits found with them, and some pitfalls.

840 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