- Home
- Forum
- ASP.NET Web Forms (Classic)
- Cannot open file
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 -:)
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 -:)
SIGN IN To post a reply.
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
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
-
V4 V4mp1r3
- Nov 9, 2007 10:18 AM UTC
- Nov 10, 2007 11:11 AM UTC