xmlns attribute automatically added to the element after xlsx export.

xmlns attribute automatically added to the element after xlsx export.

alex_kalex_k Posts: 1Questions: 1Answers: 0

Hello.
I am using buttons plugin to export data as an excel file.

Using customize function i am adding <hyperlinks> element to the sheet1.xml

<hyperlink ref="A11" r:id="rId4">

But after the file is exported, the xmlns attribute is added to the <hyperlink> element

<hyperlink xmlns="http://www.w3.org/1999/xhtml" ref="A11" r:id="rId4">

This causes an error when opening the file using MS Excel.
When i manually edit the files in the exported excel file and remove the xmlns tag, everything is working correctly.
I've tried to debug this, and when the files are zipped using JSZIP there is no xmlns attribute present, but after the file is saved on my computer, the tag is there. I cannot figure out when the tag is added and how to remove it. Did someone encounter this issue ?

Thanks.

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @alex_k ,

    That's not something DataTables would add, we just export the data as is. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.