We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to check if Excel is currently open, using XlsIO?

Thread ID:





93068 Feb 22,2010 06:05 AM Feb 23,2010 04:02 AM Windows Forms 3
Tags: XlsIO
Farman Samee
Asked On February 22, 2010 06:05 AM


In my application I wish to export to Excel a worksheet (containing a chart). To do this I need to know if Excel is already up and running (to avoid re-starting Excel when it is already open, which causes a crash). I am not sure how to reference the Excel (application) object? For example, I wish to write something like

if (Application != null)
{ \\ open Excel and export }

where Application represents Excel, but I am not sure how to do this correctly?
My second question follows on from this, I then wish to check for any open workbooks, e.g.

if (Application.Workbooks != null)

If you can provide any help on this, would be much appreciated. Thanks in advance.

Farman Samee
Replied On February 22, 2010 06:09 AM

apologies I think I wrote down the wrong email..

Farman Samee
Replied On February 22, 2010 06:11 AM

PS- I would still like help with this!!

Geetha M [Syncfusion]
Replied On February 23, 2010 04:02 AM


Thank you for your interest in Syncfusion products.

It is always preferred to close ExcelEngine object after all the workbook operation gets over. Hence you may check if the ExcelEngine is null or not. Also, to check for the open workbooks, you may check if application.ActiveWorkbook is null or not.


Please try this and let us know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.