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.

Checking Instance of File

Thread ID:

Created:

Updated:

Platform:

Replies:

27100 Apr 6,2005 09:31 AM Apr 19,2005 12:47 PM Windows Forms 1
loading
Tags: XlsIO
Mohammad Abdullah
Asked On April 6, 2005 09:31 AM

Hi If I want to toc check the instance of file (X.xls) is it open or not? How I can do this? provide example with (Iworkbook) object.

Administrator [Syncfusion]
Replied On April 19, 2005 12:47 PM

Hi Mohammad, Here is a code snippet to check for a file that already exists try { myWorkbook.SaveAs("Sample.xls"); } catch (System.Runtime.InteropServices.ExternalException ex) { if(ex.ErrorCode == -2147287007) { MessageBox.Show("The file that you are trying to create is already open","File is Open"); } } Thanks, Stephen. >Hi > > If I want to toc check the instance of file (X.xls) is it open or not? How I can do this? provide example with (Iworkbook) object.

CONFIRMATION

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.

;