Category: Question and Answers
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Issues when fetching Data through google sheet when only numbers are present in column

Issue

I am trying to fetch JSON data through a Google Sheet, but when there is a string header present in all integer values, the string header is getting fetched as an empty string. The issue can be resolved by setting the Table Heading Row Index field to the correct value, which in this case is 3.

Resolution

The issue is that when fetching JSON data through a Google Sheets query, any string header present in all integer values is getting fetched as an empty string. The solution is to check and set the correct Table Heading Row Index. In the provided sample JSON data, the third row contains the correct headers. Therefore, setting the Table Heading Row Index to 3 in the Google Sheets query should solve the issue.

Example code for the Google Sheets query:

=QUERY(IMPORTJSON("URL or Filepath"), "SELECT *", 3)

This query will import the JSON data from the specified URL or Filepath and select all rows and columns starting from the third row, which contains the correct headers.