Sheetfast generation payload examples
Multiple Sheets
{
"sheets": [
{
"name": "Sheet name 1",
"rows": [
{
"id": 2464554,
"bonus": "SSD Externe 1 To"
},
{
"id": 2419927,
"bonus": "SSD Externe 2 To"
},
{
"id": 2464555,
"bonus": "Computer"
}
]
},
{
"name": "Sheet name 2",
"rows": [
{
"id": 2464555,
"bonus": "SSD Externe 2 To"
},
{
"id": 2419928,
"bonus": "SSD Externe 2 To"
}
]
}
]
}
Single Sheets with Title
{
"options": {
"headers": {
"participationStatus": "Status Participation"
},
"removeHeaderRow": false,
"CSVDelimiter": ";"
},
"sheets": [
{
"name": "SHITFAST",
"options": {
"title": "The Shitfast example"
},
"rows": [
{
"city": "Prout",
"size": "XXL"
},
{
"city": "Boum",
"bonus": "S"
}
]
}
]
}
{
"sheets": [
{
"name": "Sample Sheet",
"rows": [
{
"id": 1,
"details": { "name": "Alice", "age": 30 },
"scores": [10, 20]
},
{
"id": 2,
"details": { "name": "Bob", "age": 25 },
"scores": [30, 40]
},
{
"id": 3,
"details": { "name": "Charlie", "age": 35 },
"scores": [50, 60]
}
],
"options": {
"headers": {
"id": "ID",
"details": "Details",
"scores": "Scores"
},
"formatters": {
"details": "json",
"scores": "json"
}
}
}
]
}
Output
id | details | scores |
---|
1 | {"name": "Alice", "age": 30} | 10, 20 |
2 | {"name": "Bob", "age": 25} | 30, 40 |
3 | {"name": "Charlie", "age": 35} | 50, 60 |
Understood. Here’s an example where the input dates are in ISO 8601 string format, and they will be formatted into three different date formats.
{
"sheets": [
{
"name": "Date Format Sheet",
"rows": [
{
"id": 1,
"date_col1": "2023-07-01T12:00:00Z",
"date_col2": "2023-07-01T12:00:00Z",
"date_col3": "2023-07-01T12:00:00Z",
"date_col4": "2023-07-01T12:00:00Z"
},
{
"id": 2,
"date_col1": "2023-08-15T08:30:00Z",
"date_col2": "2023-08-15T08:30:00Z",
"date_col3": "2023-08-15T08:30:00Z",
"date_col4": "2023-08-15T08:30:00Z"
},
{
"id": 3,
"date_col1": "2024-01-10T18:45:00Z",
"date_col2": "2024-01-10T18:45:00Z",
"date_col3": "2024-01-10T18:45:00Z",
"date_col4": "2024-01-10T18:45:00Z"
}
],
"options": {
"formatters": {
"date_col1": "date::%d/%m/%Y",
"date_col2": "date::%m-%d-%Y",
"date_col3": "date::%Y/%m/%d",
"date_col4": "date::%Y-%m-%d %H:%M"
}
}
}
],
"options": {
"filename": "date_format_example"
}
}
Output
id | date_col1 | date_col2 | date_col3 | date_col4 |
---|
1 | 01/07/2023 | 07-01-2023 | 2023/07/01 | 2023-07-01 12:00 |
2 | 15/08/2023 | 08-15-2023 | 2023/08/15 | 2023-08-15 08:30 |
3 | 10/01/2024 | 01-10-2024 | 2024/01/10 | 2024-01-10 18:45 |