Excel bug with XML connection path

Hi,

I'm importing data from XML file to Excel, and in a first time all seems to be working correctly.

But if you save the file and re-open it, the source stops working.

I'm developing a plugin using Excel interop, so I've explored the clases and I noticed that the first time that you import an XML file, XmlMap.Databinding.SourceUrl has the full path, but after open the Excel file, the XmlMap.Databinding.SourceUrl only stores 230 characters from the real source path. And exploring the file as a zip, the connections.xml file is storing correctly the full path.
So I don't know why but when you open an Excel file excel is trimming the SourceUrl to 230 chars and I think that is an incorrect behavior.

Note: I've tested this on Excel 2007 and Excel 2013

regards,

Sergio.


  • Edited by Sergiodebst Wednesday, March 25, 2015 1:36 PM Info about Excel versions
March 25th, 2015 1:24pm

I don't have a direct answer, but you may also consider using Power Query add-in to import the XML file. Power Query can create a refreshable connection that can import your XML into the worksheet or Data Model. With easy user interface you can parse the XML and retrieve your data.

The add-in is available for free for Office 2010, 2013 and Office 365 Professional Plus.

Let me know I you want to hear more, or direct you to relevant resources.




Free Windows Admin Tool Kit Click here and download it now
March 25th, 2015 3:55pm

Hi,

thanks for you support, but Power Query is not an option, because in fact I'm building an Excel add-in to interact with my own application and services and also I want to give support to Excel 2007 users. I need to use the standart Excel functionality to import XML data (via Excel interop....).

Have you been able to reproduce the issue? Is it a known bug? Exists any update or workaround to import XML data (with long URL)?



Reagards,

Sergio

March 27th, 2015 9:55am

Hi Sergio,

This forum is for general questions and feedback related to Microsoft Excel, Office XML related questions are recommended to be posted in the following forum:

https://social.msdn.microsoft.com/Forums/en-US/home?forum=os_binaryfile&filter=alltypes&sort=lastpostdesc

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

Steve Fan

Forum Support

Free Windows Admin Tool Kit Click here and download it now
March 29th, 2015 9:44pm

Hi Steve,

sorry if this is not  the correct forum, I thought It was...

Can you move the post or should I create a new one in Office XML?

March 30th, 2015 3:45am

Hi,

You can just create a new one in the correct forum.

Thank you for your understanding.

Steve Fan

Forum Support

Free Windows Admin Tool Kit Click here and download it now
March 30th, 2015 10:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics