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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Help! Saving new XlsIo Excel 2007 Spreadsheet

Thread ID:

Created:

Updated:

Platform:

Replies:

99423 May 19,2011 12:11 PM May 20,2011 12:17 AM ASP.NET Web Forms (Classic) 2
loading
Tags: XlsIO
Brian O''Neil
Asked On May 19, 2011 12:11 PM

This C# code using XlsIo version 6.403.0.15 in .NET 3.5:

this.engine = new ExcelEngine();
this.application = engine.Excel;
this.application.DefaultVersion = ExcelVersion.Excel2007;
this.workBook = engine.Excel.Workbooks.Add(ExcelVersion.Excel2007);
this.workBook.Worksheets[0][1, 1].Text = "Hello";
this.workBook.SaveAs(filename);
this.workBook.Save(); <<-- Exception thrown here.

Causes this exception:

System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveArchiveItemRelationContentType(String partName, String contentType, String relationType)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocumentProperties()
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument()
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.SaveDocument(String filename)
at Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.Serialize(String fullName, WorkbookImpl book, ExcelSaveType saveType)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(String FileName, ExcelSaveType saveType, ExcelVersion version)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SaveAs(String FileName)
at Syncfusion.XlsIO.Implementation.WorkbookImpl.Save()

Any ideas on what I'm doing wrong?

Everything works fine with 97-2003 Excel version but I'm creating a spreadsheet that has over 65,536 rows and need to use the 2007 Excel version.

As many are I'm on a tight project deadline and would appreciate any help.




Brian O''Neil
Replied On May 19, 2011 12:53 PM

I did download the trial of the latest version of the XlsIo components and the code works fine.

Would still like to know if there is a way to make the older version work.



Sridhar [Syncfusion]
Replied On May 20, 2011 12:17 AM

Hi Brain,

Thank you very much for using Syncfusion products.

The version 6.4 is almost 3 years old and we have issued about 11 major releases from that time. From a technical perspective, it would be a difficult task to migrate to the lowest version. We would therefore urge you to upgrade. We will also help you with migration issues if any.

Please let us know if you require any further clarifications.

Regards,
Sridhar.S




CONFIRMATION

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.

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

;