Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

FilterXML converting to date/time

$
0
0
I am using the WEBSERVICE function in Excel 2013 to download XML files into a cell for me dynamically.  Then I am using the FILTERXML function to parse these XML files automatically.  Everything works well, but on any numeric values which are greater than 1900 and less than 9999, Excel is spitting out the number of days between my number and 1/1/1900.  I was only able to find one article regarding this bug here: 'https://github.com/rubensayshi/gw2spidy/pull/116' and therefore am hoping there is an easy fix or I am doing something wrong since the rest of the world hasn't mentioned it.

An example XML string I am dealing with is below using WEBSERVICE, which I have located in cell A2.
<?xml version='1.0' encoding='UTF-8'?>
<blueprint id="33201" name="Scan Rangefinding Array II" productiontime="4500" productionmodifier="900" waste="10" >
<totalmaterials>
<material name="Number1" id="87" />
<material name="Number2" id="1902" />
<material name="Number3" id="186" />
</totalmaterials>
</blueprint>

My current solution for parsing the example above using FILTERXML:
=FILTERXML(A2,"//totalmaterials/material[2]/@id")

It should return the value 1902, but instead returns a value of 731 because of this problem.  What could I do to fix it please?

Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>