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

Cannot open a file URGENT!!!

Hi, I trying to open an excel file using:
application.Workbooks.Open(),
but I'm getting the following exception:

System.Runtime.InteropServices.ExternalException was unhandled by user code
Message="Cannot open storage. File Name is: C:\\Documents and Settings\\Ivan.EP\\My Documents\\RemotePaymentKRTest\\VerifyFromBank.xls"
Source="Syncfusion.XlsIO.Base"
ErrorCode=-2147286960
StackTrace:
at Syncfusion.XlsIO.IO.Stream.StgStream..ctor(String fileName, STGM flags)
at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String strFileName, ExcelParseOptions options, Boolean bReadOnly, String password)
at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String strFileName, ExcelParseOptions options)
at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String FileName)
at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile)
at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(String Filename)
at Com.MarketVision.RemotePayment.KRPlugin.Plugin.impForm_Closing(Object sender, CancelEventArgs e) in C:\Documents and Settings\Ivan.EP\My Documents\C#\Com.MarketVision\Com.MarketVision.RemotePayment.KRPlugin\Plugin.cs:line 407
at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)
at System.Windows.Forms.Form.CheckCloseDialog(Boolean closingOnly)


The file is attached.
Thank you

VerifyFromBank.zip

1 Reply

MW Melba Winshia Syncfusion Team February 9, 2007 07:00 AM UTC

Hi Ivan,

Thanks for your interest in Essential XlsIO.

The file that you have attached is a text (tab delimited) document but is renamed with an .xls extension. Please note that you need to specify the string separator value when opening such documents. Here is the sample for your reference:

Test_XLSIO.zip

Could you please specify correct delimiter when opening such excel files and let me know the problem still exists?

Thanks,
Melba

Loader.
Live Chat Icon For mobile
Up arrow icon