I have a web service that accepts OData filters and can serve data in json or csv, respecting the Accept content-type header. I now have users trying to use the service from Microsoft Excel OData feed, but Excel does not send any Accept header. I tried returning the data in csv format when I see the User-Agent: PowerPivot but Excel does not seem to like the the csv data.
What is the expected Content-Type and shape of the data returned that makes Excel OData works? Is there any particular schema expected?
Related
After some trial and error, and a support call to Microsoft's Data Factory team of engineers, supposedly the product does not support CDATA values returned in XML.
I am using a web sink using XML format to send SOAP headers, and return XML data that contains CDATA formatting. Everything comes back properly in my pipeline, except the XML values containing any sort of CDATA formatting.
Is there a known workaround for this within Azure or Data Factory itself?
Thank you
I was trying to understand if there is any feature available that would allow you to export the API query results to formats such as csv, xls, etc. But i did not find it. So i wonder if i am missing something, but the requirement would be to be able to easily export the results of a given query that i execute against my API hosted in API Management. Thanks
Only /reports API support returning results in format other than JSON and only in CSV.
I'm trying to use Excel to connect to a netsuite restlet script to pull information and populate a sheet.
I have tried to connect via "web" and entering the url and adding headers. If I try to add the content-type to be application/json, I get an error that "name":"INVALID_RETURN_DATA_FORMAT","message":"Invalid data format. You should return TEXT"
I saw that I can connect to a JSON file via Excel, or to a webservice, but it doesn't seem to return the json object. Is there something I am doing wrong? I have the authorization and content-type headers, and my url is correct for the external url of the webservice. Is there a better way to do this?
The purpose of this file is to essentially pull down records of a certain type into Excel, allow the user to edit, and then push that information back into Netsuite. The restlet is working well, now I just need to get the Excel portion working properly.
Thanks!
You need to include a Content-Type Header in your request.
Content-Type: application/json
NetSuite looks at this not only to identify the request body format, but also the encoding of the Restlet's response. (It's a bit counter-intuitive, because usually an Accept header is used to tell the server the response content type expected, especially if you are just sending a GET request that doesn't even have a body.. but that's NetSuite..)
For more details see the Help Center topic "Creating a Content-Type Header"
We use web queries to retrieve data in Excel for reporting purpose. These Web queries are working correctly in Excel 2007, 2010, 2013 and 2016.
But when used in Mac Excel 2016 it fails.
We perform these web queries using VBA and retrieve data generated by a Spring REST interface.
I already tried using http GET instead of http POST and tried performing the web query via the UI ('Data' -> 'Get External Data' -> 'Run Saved Query' using a .iqy file).
Also error seems not to be content related (tried very simple html; <html><body><table><tr><td>col1</td></tr><tr><td>value1</td></tr></table></body></html>).
When using Wireshark to analyze the traffic, the response of the REST call is correct (http 200 with correct content).
Errors reported using UI import using '.iqy' file: "cannot locate the internet server or proxy server".
Error performing web query using VBA: "Error 1004 Application-defined or Object-defined error".
Does anyone have an idea what can cause this behavior?
Found the reason: Spring MVC (REST) has some default headers it sets. One of them is X-Content-Type-Options: nosniff. The way we generated some of the REST response data, resulted in not setting the Content-Type header.
Mac Excel was not able to determine the content type (because of the X-Content-Type-Options: nosniff option).
This can be solved by either not setting the X-Content-Type-Options header or explicitly set the Content-Type header.
Bonus info: I've used WireMock to simulate REST interface and was able to strip headers one by one exposing the culprit.
I would like to import weather forecasts in PowerPivot for a specified country by using Yahoo API.
So first of all I got the data stream URL including all requiered parameters to get forecasts (it works in my browser).
https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%3D612977&format=json&diagnostics=true&callback=
Then I tried to use it as "Other data Stream" in PowerPivot to grab the content.
However I got the following strange error about DTD :
Cannot connect to the specified feed. Verify the connection and try
again. Reason: For security reasons DTD is prohibited in this XML
document. To enable DTD processing set the DtdProcessing property on
XmlReaderSettings to Parse and pass the settings into XmlReader.Create
method
Any idea to solve that ?
The easiest was to install PowerQuery for Microsoft Excel then creating a new request to Yahoo Web Services.
After parsing data in PowerQuery (split columns, etc) , formatted data is available in a PowerPivot tab and you can use it as well as direct imported data in PowerPivot.