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

ArgumentException: Collection already contains style with same names

Hi

I'm using XlsIO to load a .xlsx file which I use as a template, populate with data and then prompt the user to save it. 

This works fine on my testing server, but when I try to use it on my live server I get the following error

Exception Details: System.ArgumentException: Collection already contains style with same names Followed Hyperlink.

when it gets to the following line
Line 213: Dim workbook As IWorkbook = excelEngine.Excel.Workbooks.Open(Server.MapPath("xls_template/pipeline report template.xlsx"), ExcelVersion.Excel2010)
[ArgumentException: Collection already contains style with same names Followed Hyperlink.]
   Syncfusion.XlsIO.Implementation.Collections.StylesCollection.Add(IStyle style) +247
   Syncfusion.XlsIO.Implementation.Collections.StylesCollection.Add(StyleRecord style) +43
   Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseStyle(XmlReader reader, List`1 arrNamedStyleIndexes) +310
   Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseStyles(XmlReader reader, List`1 arrNamedStyleIndexes) +164
   Syncfusion.XlsIO.Implementation.XmlReaders.Excel2007Parser.ParseStyles(XmlReader reader, Stream& streamDxfs) +641
   Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseWorkbook(List`1& themeColors) +349
   Syncfusion.XlsIO.Implementation.XmlSerialization.FileDataHolder.ParseDocument(List`1& themeColors) +270
   Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseExcel2007Stream(Stream stream, String password) +84
   Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseStream(Stream stream, String password, ExcelVersion version, ExcelParseOptions options) +93
   Syncfusion.XlsIO.Implementation.WorkbookImpl.ParseFile(String fileName, String password, ExcelVersion version, ExcelParseOptions options) +82
   Syncfusion.XlsIO.Implementation.WorkbookImpl..ctor(IApplication application, Object parent, String strFileName, ExcelParseOptions options, Boolean bReadOnly, String password, ExcelVersion version) +304
   Syncfusion.XlsIO.Implementation.ApplicationImpl.CreateWorkbook(Object parent, String strTemplateFile, ExcelVersion version) +58
   Syncfusion.XlsIO.Implementation.Collections.WorkbooksCollection.Open(String filename, ExcelVersion version) +32
   _Create.Page_Load(Object sender, EventArgs e) in D:\vhosts\procure21plus.nhs.uk\httpdocs\club\resources\s_curve\Create.aspx.vb:213
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
any ideas?


3 Replies

RA Rajesh A Syncfusion Team September 12, 2012 06:55 AM UTC

Hi Giles Billingsley,

Thank you for using the Syncfusion products.

The reported exception “Collection already contains style with same names Followed Hyperlink” has been fixed recently in our latest version. Kindly check with our latest version and get back to us with your version details and the issue reproducing sample or input file, if the issue is reproducing. This helps us to investigate further on the issue.

Also, you can open an incident from DirectTrac to report the same in future.

DirectTrac Login Link : Login

Our Latest Version Link : http://www.syncfusion.com/downloads/latest-version

Kindly let us know if you need any clarification.

Regards,

Rajesh A



GB Giles Billingsley September 13, 2012 01:11 PM UTC

Thanks, that fixed it. I discovered my live server was using a much earlier version of XlsIO than the testing server, so upgrading it fixed the problem.

I've just downloaded and upgraded to the latest version of syncfusion (10.3), but discovered that Assemblies/3.5/Syncfusion.Calculate.Web.dll has disappeared, so I've stuck with 10.2 for the moment. Has it gone, never to return?


SS Sivaguru S Syncfusion Team September 18, 2012 07:39 PM UTC

Hi Giles,

Thanks for the update.

Can you please post a support ticket in direct trac with the mentioned queries ?

Regards,
Sivaguru S

Loader.
Live Chat Icon For mobile
Up arrow icon