Convert a Table to JSON
Converts a table into JSON.
Overview
This procedure transforms a given table into its JSON representation. It accepts a table as input and outputs a JSON that represents the table's structure and content.
Prerequisite Data
These required data elements must be present in the automation before using the procedure.
the table
Table
Syntax
Below is a line-by-line overview of the automation syntax. Expand each line to learn more.
Examples
1. Convert a Sample Table to JSON
create a sample table
convert the table to a json
2. Convert a Table to JSON with Date & Time Data
Consider the following table that is stored in a .xlsx
file:
Carrot
2025-01-15
14:30:00
150
Broccoli
2025-03-20
09:00:00
85
open the table at the file
convert the table to a json
the datetime format is "%m-%d-%Y"
Details
The table below lists common datetime codes that can be combined to specify a format string.
Each directive represents a specific component of a date or time, such as year, month, day, etc.
%Y
4-digit year
2025
%y
2-digit year
25
%m
Month (01-12)
06
%B
Full month name
June
%b
Abbreviated month name
Jun
%d
Day (01-31)
18
%H
Hour (24-hour, 00-23)
14
%I
Hour (12-hour, 01-12)
02
%p
AM/PM
PM
%M
Minute (00-59)
30
%S
Second (00-59)
45
%f
Microsecond (000000-999999)
000123
%z
UTC offset (+HHMM)
+0000
%Z
Timezone name
UTC
%j
Day of year (001-366)
169
%U
Week number (Sun first day)
25
%W
Week number (Mon first day)
25
%c
Locale date & time
Tue Jun 18 14:30:00 2025
%x
Locale date
06/18/25
%X
Locale time
14:30:00
Last updated
Was this helpful?