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

Open Fails with Exception

Hi,

I'm trying to open diffrent Excel documents with your component using this code:
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
IWorkbook myWorkbook = application.Workbooks.Open(@"D:\tmp\Test.xls");

It will fail with Exception:
Unbehandelte Ausnahme: System.ArgumentException: Name of the Name object must be unique.
bei Syncfusion.XlsIO.Implementation.Collections.WorkbookNamesCollection.Add(IName name)
bei Syncfusion.XlsIO.Implementation.Collections.WorkbookNamesCollection.Add(NameRecord name)
bei Syncfusion.XlsIO.Implementation.WorkbookImpl.PrepareNames()
bei Syncfusion.XlsIO.Implementation.WorkbookImpl.Parse(BiffReader reader, ExcelParseOptions options, String password)
bei Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStgStream(StgStream stream, ExcelParseOptions options, String password)
bei Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String strFileName, ExcelParseOptions options, Boolean bReadOnly, String password)
bei Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile)
bei Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(String Filename)

Excel will open the the file without any problems, and if I try another file the code works fine too.

I do not need all information of the worksheets (I just have to compare cells of 2 generated files) so, is there a way to supress this function, so that I can load the file?

best regards

Joe

XLSIO Version: 5.102.0.51
VS 2005


3 Replies

BP Bhuvaneswari P Syncfusion Team May 16, 2008 04:17 AM UTC

Hi Joachim,

Thank you for your interest in Syncfusion products.

If possible could you please send the spreadsheets that you are trying to open. It would help in identifying the problem.

Is this problem for all the files or while opening specific file? If its coming for all the files, please send us the environment details also.


These details will helps us to analysis more and provide a better solution.

Best Regards,
Bhuvana




AD Administrator Syncfusion Team June 10, 2008 09:34 AM UTC

Hi Bhuvana,

sorry for answering so late.
It 's impossible to send the file, because it happens only with customer data and those are confidential (financial data).

I tried to produce the error with offical testing data, but I could not reproduce it in my compare app.
So I've to wait and see if it happens again and then you will get a testfile.

best regards
Joe

>Hi Joachim,

Thank you for your interest in Syncfusion products.

If possible could you please send the spreadsheets that you are trying to open. It would help in identifying the problem.

Is this problem for all the files or while opening specific file? If its coming for all the files, please send us the environment details also.


These details will helps us to analysis more and provide a better solution.

Best Regards,
Bhuvana






YG Yavanaarasi G Syncfusion Team June 30, 2008 06:55 AM UTC

Hi Joe,

Thank you for your update.
If the issue reproduced again, you can create a Direc-Trac incident regarding this issue and try to send the file so that the attachment remains confidential.

Regards,
G.Yavana


Loader.
Live Chat Icon For mobile
Up arrow icon