Convert spreadsheet to JSON
Convert data in spreadsheet to their corresponding JSON format
“Spreadsheet to JSON” allows you to convert a table like data (e.g. a CSV file) to its corresponding JSON format. JSONs are very easy to use in code steps.
How to use Convert a spreadsheet to JSON
Add the component
Add the Spreadsheet to JSON converter step to your Tool (check how to get started with creating a tool).
File URL
A “Spreadsheet to JSON” converter requires a file as an input. If your file is publicly accessible on the web (i.e. with no
authentication or sign-up requirement), simply provide the URL directly or as a
text input. Otherwise, you will need to add a
File-to-URL input.
In either situation, use the {{variable name}}
to provide the data to the converter.
Follow the links below for more information about
- How to run a step
- How to delete a step
- How to configure output
- How to configure a default value
- How to move a step in a Tool
- How to duplicate a step
- How to add condition to a step (i.e. execute only if a condition is met)
- How to loop a step (i.e. run one step multiple times)
Access the step output
The output is a dictionary with a key rows
.
spreadsheet_to_json[rows]
is a list containing as many rows as included in the uploaded file.- Each row is a dictionary representing one row of data (i.e. keys are column headers in the uploaded spreadsheet).
Below you can see samples where the default name assigned to the step spreadsheet_to_json
is used.
Note that a step name is different from the step title. Step titles can be found on the top left
of steps. A step name is shown on the bottom left, in smaller font and highlighted green.
Common errors
Unsupported file type
An error similar to the one noted below indicates that the provided input is not a valid spreadsheet.
Was this page helpful?