Free Support Forum -

Aspose can no longer open locked Excel files


My application opens Excel files using code similar to this:

var workbook1 = new Workbook();
workbook1.Open(@"C:\asposetests\Test1.xls", FileFormatType.Default);

When we were using version of Aspose.Cells , this code would work even if someone had the named file open in Excel.

Since moving to version (and which I just tried), this is no longer the case. If the Excel file is open, the code throws this error:

System.IO.IOException: The process cannot access the file 'C:\asposetests\Test1.xls' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Aspose.Cells.Workbook.Open(String fileName, FileFormatType type)

Is there any way we can get the old behaviour? Our users want to be able to keep their files open even while using them in our application.

Thank you,



Please try the attached latest fix v4.9.0.2.

If you still find the issue, kindly post your template file here. We will check your issue soon.

Thank you.

This version does solve my problem.

Thanks much,