Recently I coded a WebAPI endpoint to support a JavaScript application. A power user asked “How can I view this data with Excel”? Given how the default format is JSON we didn’t see an immediate option.
However, with a little homework we found a way to set XML before JSON and give a default XML format that is compatible with Excel data connections.
Check out the below 5 minute video and code snippet to see how.
Cheers!

Code
//default XML
config.Formatters.Clear();
config.Formatters.Add(new System.Net.Http.Formatting.XmlMediaTypeFormatter());
config.Formatters.Add(new System.Net.Http.Formatting.JsonMediaTypeFormatter());