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 when I open a file xlsm

Thread ID:





107048 Feb 8,2013 03:19 PM UTC Feb 12,2013 05:12 AM UTC ASP.NET Web Forms (Classic) 1
Tags: XlsIO
Cristiano Cristiani
Asked On February 8, 2013 03:19 PM UTC

Hi, I'm trying to open and read an Excel 2007 file (xlsm), but the following code return the System.Xml.XmlException: 'o:relid' is a duplicate attribute name. Line 33, position 26 (attached the stack trace for more details):

Dim excelengine As ExcelEngine = New ExcelEngine
Dim application As IApplication = excelengine.Excel
application.DefaultVersion = ExcelVersion.Excel2007
Dim xlsfile As String = fname
Dim filename As String = Server.MapPath("Upload") & "\" & userhostaddr & "\" & xlsfile & "file.xlsm"
Dim workbook As IWorkbook = application.Workbooks.Open(filename, ExcelParseOptions.DoNotParseCharts, False, String.Empty, ExcelVersion.Excel2007)

The file is an Excel 2007 file with macro, structured reference formulas and image.

I use VisualStudio 2008 Framework 3.5

I referenced:

I tried to open and edit the xls file then save it in xlsm with Syncfusion (workbook.saveAs) but Ms Excel is not able to open it.
Then, I trid to open xlsm file with ExcelOpenType.Automatic but I get the same System.Xml.XmlException error message
Finally, I tried to convert the file to xlsb but is not supported.

Syncfusion is possible to open and edit the file xlsm, as I need?  Otherwise there are warkaround?
Thank you very much for your help.


Sridhar [Syncfusion]
Replied On February 12, 2013 05:12 AM UTC

Hi Cristiano,

Thank you for using Syncfusion products.

Could you please update us  with the excel file (.xlsm) which reproduces the above reported Xml exception so that we are able to proceed further on this.

Also, please upgrade to our latest version as 8.1 version is 3 years old.

Later vesion link:

Pleae let me know if you require any further clarifications.



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