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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error opening Excel file

Thread ID:





50210 Oct 9,2006 03:56 PM UTC Oct 11,2006 10:14 AM UTC WinForms 1
Tags: XlsIO
Doug Schwenk
Asked On October 9, 2006 03:56 PM UTC

When I try to open an Excel file with a path like this:

S:\data\2006\10-16-06 data 2.xls

I get an exception below. Are dash or space illegal characters?

ex.ToString() "System.ArgumentException: Illegal characters in path.\r\n at System.IO.Path.CheckInvalidPathChars(String path)\r\n at System.IO.Path.GetFileName(String path)\r\n at Syncfusion.XlsIO.Implementation.ExternWorkbookImpl.InitShortName()\r\n at Syncfusion.XlsIO.Implementation.ExternWorkbookImpl.Parse(BiffReader reader)\r\n at Syncfusion.XlsIO.Implementation.Collections.ExternBookCollection.Parse(BiffReader reader)\r\n at Syncfusion.XlsIO.Implementation.WorkbookImpl.Parse(BiffReader reader, ExcelParseOptions options)\r\n at Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, Stream stream, ExcelParseOptions options)\r\n at Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, Stream stream, ExcelParseOptions options)\r\n at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.OpenReadOnly(String strFileName, ExcelParseOptions options)\r\n at Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.OpenReadOnly(String strFileName)\r\n at ReadStaticPositions.Form1.ReadPositions() in c:\\projects\\ReadStaticPositions\\ReadStaticPositions\\Form1.cs:line 58" string

Here''s the C# code:

ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;

string fp = StaticPath();
if( !File.Exists(fp) )
MessageBox.Show("Can''t find file\n\n" + fp);

IWorkbook workbook = application.Workbooks.OpenReadOnly(fp);
IWorksheet sheet = workbook.Worksheets[0];


excelEngine.ThrowNotSavedOnDestroy = false;

Melba Winshia [Syncfusion]
Replied On October 11, 2006 10:14 AM UTC

Hi Doug,

I am afraid. I was unable to reproduce the issue. I used the following test sample to test your issue.

Sample :

Would it be possible to provide me your sample xls file in which you are able to reproduce the issue? It will help me in investigating further on this issue.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon