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. Image for the cookie policy date
close icon

error importing opened excel file

I''m using Syncfusion version 3.3.0.0. I''m trying to import an excel file into my app using the following line of code: IWorkbook theBook = ExcelUtils.Open(FileName); If the user has the spreadsheet open already, I see the following runtime error: An unhandled exception of type ''System.Runtime.InteropSrvices.ExternalException'' occurred in syncfusion.excelrw.base.dll Additional information: Can not open storage. File Name is: C:\PricingToolStuff\OptionTest3.xls Do I need to do something in particular to allow the user to open this file in the app. while the user has it open? Or is this an error I need to handle and make the user close the file?

1 Reply

AD Administrator Syncfusion Team June 8, 2006 04:14 PM UTC

Hi, I am able to reproduce the problem. This is because we didn''t have support for read only mode of opening the excel template file in version 3.3.0.0 we need to explicitly handle this error and make the user to close the file. However in the latest version 4.2.0.37 this issue has been resolved with a new method OpenReadOnly(). Here is a code which opens a template file in ReadOnly mode: IWorkbook workbook = application.Workbooks.OpenReadOnly(@"../../Data/Template.xls"); and here is sample for your reference:Readonlymode.zip Here is the download link for the latest version. DownloadLink: http://www2.syncfusion.com/Installs/v4.2.0.37/SyncfusionEssentialStudioSetup.exe Note: This version requires a separate key to install. Please contact sales if you have not received a key. I hope this would resolve your problem. Please let me know if you any other concerns. Thanks, Bharath.

Loader.
Live Chat Icon For mobile
Up arrow icon