0
votes

Context: Using Powerquery in Excel 2016 (Get & Transform) to receive data from a REST API which only accepts content-type: application/json. The content for HTTP POST request is stored in an excel table, which is to be converted to JSON for POST content.

If I use the following example from: https://msdn.microsoft.com/en-us/library/mt637075.aspx:

Request = Text.FromBinary(Json.FromValue([A={1, true, "3"}, B=#date(2012, 3, 25)])) 

It returns the error:

Expression error: The name 'Json.FromValue' wasn't recognized.  Make sure it's spelled correctly.

Is it possible that the version of Powerquery in-built in Excel 2016 is missing this function? If so, is there another way of transforming the data to JSON in Powerquery?

1
Do you have the latest update for Excel 2016? What version of Power Query is running? You can check this from New Query | Query Options and going to the Diagnostics tab.Alejandro Lopez-Lago - MSFT
Version is 2.24.4065.1401David Russell
It works in Power BI which has Power Query version 2.36.4434.362 64 bit (June, 2016)David Russell

1 Answers

1
votes

You need to update Excel 2016. The latest update has Json.FromValue.