json2xls

PAID
By json-xls.com
Updated 4 months ago
Tools
-/10
Popularity Score
-
Latency
-
Success Rate

json2xls API Documentation

Converts JSON and XML files to

  • CSV /TSV
  • XLS/XLSX (Excel spreadsheet format)
  • HTML files using Plain and Hierarchical rendering view.
View API Details
JSON to
POSTConvertJsonRaw
POSTConvertJsonFile
XML to
POSTConvertXmlFile
POSTConvertXmlRaw
POSTConvertJsonRaw
Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
formatSTRING
REQUIREDFile format: XLSX, XLS, CSV, TSV or HTML
layoutSTRING
REQUIREDAuto, Portrait or Landscape
viewSTRING
REQUIREDBoth, Hierarchy, Plain
ConvertJsonRaw-Plain modelJSON_STRING
REQUIRED
Optional Parameters
internalidsSTRING
OPTIONALBoth or None. Unique internal IDs are generated for each JSON token (XML element). They might help to lookup corresponding records(rows) between Excel sheets (CSV files)
Code Snippet
unirest.post("https://json2xls-json-xls-v1.p.rapidapi.com/ConvertJsonRaw?format=XLSX&layout=Auto&view=Both&InternalIDs=Both")
.header("X-RapidAPI-Host", "json2xls-json-xls-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send([{"Name":"root1","children":[{"Name":"AAA","Age":"22","Job":"PPP"},{"Name":"BBB","Age":"25","Job":"QQQ"}]},{"Name":"root2","children":[{"Name":"CCC","Age":"38","Job":"RRR"}]},{"Name":"root3","children":[]}])
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://json2xls-json-xls-v1.p.rapidapi.com/ConvertJsonRaw?format={format}&layout={layout}&view={view}&InternalIDs={internalids}
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://json2xls-json-xls-v1.p.rapidapi.com/ConvertJsonRaw?format=XLSX&layout=Auto&view=Both&InternalIDs=Both")
.header("X-RapidAPI-Host", "json2xls-json-xls-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/json")
.send([{"Name":"root1","children":[{"Name":"AAA","Age":"22","Job":"PPP"},{"Name":"BBB","Age":"25","Job":"QQQ"}]},{"Name":"root2","children":[{"Name":"CCC","Age":"38","Job":"RRR"}]},{"Name":"root3","children":[]}])
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication