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.

Error when I open a file xlsm

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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:
Syncfusion.XLsIO.Base 8.103.0.30
Syncfusion.Core  8.103.0.30
Syncfusion.Compression.Base 8.102.0.30
Syncfusion.DLS.Base   8.103.0.30
Syncfusion.Shared.Base  8.103.0.30
Syncfusion.Shared.Web  8.103.0.30

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.
Regards



ErrorOpenXlsm_StackTrace_f07ab18c.rar

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

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 10.4.0.71 as 8.1 version is 3 years old.

Later vesion link:
http://www.syncfusion.com/downloads/latest-version

Pleae let me know if you require any further clarifications.

Thanks,
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.

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.

;