The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
ADAdministrator Syncfusion Team 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.