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 file

Hello

I am not being able to open anyfile in a location other than c:\

I'm getting the following error:

{System.Runtime.InteropServices.ExternalException}
[System.Runtime.InteropServices.ExternalException]: {System.Runtime.InteropServices.ExternalException}
HelpLink: Nothing
InnerException: Nothing
Message: "Cannot open storage. File Name is: C:\Documents and Settings\dfreire\Desktop\Book1.xls"
Source: "Syncfusion.XlsIO.Base"
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 MOP.aspxMOPNomenclaturaImportacaoXLS.OpenXLSFile() in C:\Projectos\DotNetFramework\sMOP\MOP\Intranet\MOP\Modules\MOPNomenclaturaImportacaoXLS.ascx.vb:line 109
at MOP.aspxMOPNomenclaturaImportacaoXLS.OnInit(EventArgs e) in C:\Projectos\DotNetFramework\sMOP\MOP\Intranet\MOP\Modules\MOPNomenclaturaImportacaoXLS.ascx.vb:line 71
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at MOP.Intranet.mop.Default_.LoadModule() in C:\Projectos\DotNetFramework\sMOP\MOP\Intranet\MOP\default.aspx.vb:line 55"
TargetSite: {System.Reflection.RuntimeConstructorInfo}

Tks in advance -:)




1 Reply

RS Rajarajeswari S Syncfusion Team November 10, 2007 11:11 AM UTC


Hi,

I am afraid that i am not able to reproduce the problem that you have mentioned here. Please refer to the following steps that i tried to reproduce it.

1. I have created a sample in which i opened a file which is located on my desktop
using the following code snippet.

IWorkbook workbook = application.Workbooks.Open("C:\\Documents and Settings\\rajarajeswaris\\Desktop\\Book1.xls");

2. It opens properly without throwing any exception.

Please have a look at the video clip which explains you clearly about openning a file:

http://www.syncfusion.com/support/user/uploads/Open_440f18cb.zip

Please refer the sample from the below link which illustrates this:

http://www.syncfusion.com/support/user/uploads/Xlsio_32a3a6ec.zip

Please have a look at the above sample and if still the problem exists, could you please try reproducing it in the above sample or send us the reproducing steps so that we could sort out the cause of the issue and provide you a solution.

Regards,
Raji



Loader.
Live Chat Icon For mobile
Up arrow icon