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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Checking Instance of File

Thread ID:

Created:

Updated:

Platform:

Replies:

27100 Apr 6,2005 01:31 PM UTC Apr 19,2005 04:47 PM UTC WinForms 1
loading
Tags: XlsIO
Mohammad Abdullah
Asked On April 6, 2005 01:31 PM UTC

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 04:47 PM UTC

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.

Warning Icon 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.Close Icon

;