rubensayshi/gw2spidy — pull request #116 by cvpcs (2013-03-03 18:35:37+00:00)
Title: Append a .0 to numbers in the range [1900,9999] if returning XML data to Excel.

There is a bug in Microsoft Excel 2013's FILTERXML function, which causes
it to attempt to coerce numbers between [1900,9999] as dates. It then
returns their serial value (number of days since Jan 1st, 1900). This
coersion happens at a point where the user is unable to prevent it and
there is no known work around.

Luckily, when Excel 2013 requests data using its WEBSERVICE function, it
sets its user agent to Excel/15.0. We can thus check if Excel is downloading
data and if so, append a .0 to the end of numbers within that range. This
will prevent date coersion, and doesn't negatively impact the data, since
in Excel all numbers are floating points when doing calculations anyway.