curl -X POST https://api.iterationlayer.com/sheet-generation/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"format": "xlsx",
"styles": {
"header": {
"font_family": "Helvetica",
"font_size_in_pt": 11,
"is_bold": true,
"background_color": "#0D47A1",
"font_color": "#FFFFFF"
},
"body": {
"font_family": "Helvetica",
"font_size_in_pt": 11,
"font_color": "#333333"
}
},
"sheets": [
{
"name": "Timesheet — March 17–21, 2026",
"columns": [
{
"name": "Date",
"width": 14,
},
{
"name": "Project",
"width": 28,
},
{
"name": "Task",
"width": 32,
},
{
"name": "Hours",
"width": 10,
},
{
"name": "Hourly Rate",
"width": 14,
},
{
"name": "Amount",
"width": 14,
}
],
"rows": [
[
{
"value": "2026-03-17",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Homepage wireframes",
},
{
"value": 4.5,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "2026-03-17",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Stakeholder feedback meeting",
},
{
"value": 1.5,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "2026-03-18",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Product listing page design",
},
{
"value": 6.0,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "2026-03-18",
"format": "date",
},
{
"value": "Meridian Mobile App",
},
{
"value": "API integration debugging",
},
{
"value": 2.0,
"format": "number",
},
{
"value": 150,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "2026-03-19",
"format": "date",
},
{
"value": "Meridian Mobile App",
},
{
"value": "Push notification service setup",
},
{
"value": 5.0,
"format": "number",
},
{
"value": 150,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "2026-03-19",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Checkout flow prototype",
},
{
"value": 3.0,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "2026-03-20",
"format": "date",
},
{
"value": "Meridian Mobile App",
},
{
"value": "User authentication flow",
},
{
"value": 7.0,
"format": "number",
},
{
"value": 150,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "2026-03-21",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Design review and revisions",
},
{
"value": 3.5,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "2026-03-21",
"format": "date",
},
{
"value": "Meridian Mobile App",
},
{
"value": "QA testing and bug fixes",
},
{
"value": 4.0,
"format": "number",
},
{
"value": 150,
"format": "currency",
},
{
"value": null,
}
],
[
{
"value": "",
}
],
[
{
"value": "",
},
{
"value": "",
},
{
"value": "Total",
"styles": {
"is_bold": true,
"font_size_in_pt": 12,
},
},
{
"value": null,
"styles": {
"is_bold": true,
"font_size_in_pt": 12,
},
},
{
"value": "",
},
{
"value": null,
"styles": {
"is_bold": true,
"font_size_in_pt": 12,
},
}
]
],
"formulas": [
{
"row": 1,
"col": 5,
"expression": "=D2*E2",
},
{
"row": 2,
"col": 5,
"expression": "=D3*E3",
},
{
"row": 3,
"col": 5,
"expression": "=D4*E4",
},
{
"row": 4,
"col": 5,
"expression": "=D5*E5",
},
{
"row": 5,
"col": 5,
"expression": "=D6*E6",
},
{
"row": 6,
"col": 5,
"expression": "=D7*E7",
},
{
"row": 7,
"col": 5,
"expression": "=D8*E8",
},
{
"row": 8,
"col": 5,
"expression": "=D9*E9",
},
{
"row": 9,
"col": 5,
"expression": "=D10*E10",
},
{
"row": 11,
"col": 3,
"expression": "=SUM(D2:D10)",
},
{
"row": 11,
"col": 5,
"expression": "=SUM(F2:F10)",
}
]
}
]
}'{
"success": true,
"data": {
"buffer": "UEsDBBQAAAAIAA...",
"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
}import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({
apiKey: "YOUR_API_KEY",
});
const result = await client.generateSheet({
format: "xlsx",
styles: {
header: {
font_family: "Helvetica",
font_size_in_pt: 11,
is_bold: true,
background_color: "#0D47A1",
font_color: "#FFFFFF",
},
body: {
font_family: "Helvetica",
font_size_in_pt: 11,
font_color: "#333333",
},
},
sheets: [
{
name: "Timesheet — March 17–21, 2026",
columns: [
{
name: "Date",
width: 14,
},
{
name: "Project",
width: 28,
},
{
name: "Task",
width: 32,
},
{
name: "Hours",
width: 10,
},
{
name: "Hourly Rate",
width: 14,
},
{
name: "Amount",
width: 14,
},
],
rows: [
[
{
value: "2026-03-17",
format: "date",
},
{
value: "Oakwood E-Commerce Redesign",
},
{
value: "Homepage wireframes",
},
{
value: 4.5,
format: "number",
},
{
value: 125,
format: "currency",
},
{
value: null,
},
],
[
{
value: "2026-03-17",
format: "date",
},
{
value: "Oakwood E-Commerce Redesign",
},
{
value: "Stakeholder feedback meeting",
},
{
value: 1.5,
format: "number",
},
{
value: 125,
format: "currency",
},
{
value: null,
},
],
[
{
value: "2026-03-18",
format: "date",
},
{
value: "Oakwood E-Commerce Redesign",
},
{
value: "Product listing page design",
},
{
value: 6.0,
format: "number",
},
{
value: 125,
format: "currency",
},
{
value: null,
},
],
[
{
value: "2026-03-18",
format: "date",
},
{
value: "Meridian Mobile App",
},
{
value: "API integration debugging",
},
{
value: 2.0,
format: "number",
},
{
value: 150,
format: "currency",
},
{
value: null,
},
],
[
{
value: "2026-03-19",
format: "date",
},
{
value: "Meridian Mobile App",
},
{
value: "Push notification service setup",
},
{
value: 5.0,
format: "number",
},
{
value: 150,
format: "currency",
},
{
value: null,
},
],
[
{
value: "2026-03-19",
format: "date",
},
{
value: "Oakwood E-Commerce Redesign",
},
{
value: "Checkout flow prototype",
},
{
value: 3.0,
format: "number",
},
{
value: 125,
format: "currency",
},
{
value: null,
},
],
[
{
value: "2026-03-20",
format: "date",
},
{
value: "Meridian Mobile App",
},
{
value: "User authentication flow",
},
{
value: 7.0,
format: "number",
},
{
value: 150,
format: "currency",
},
{
value: null,
},
],
[
{
value: "2026-03-21",
format: "date",
},
{
value: "Oakwood E-Commerce Redesign",
},
{
value: "Design review and revisions",
},
{
value: 3.5,
format: "number",
},
{
value: 125,
format: "currency",
},
{
value: null,
},
],
[
{
value: "2026-03-21",
format: "date",
},
{
value: "Meridian Mobile App",
},
{
value: "QA testing and bug fixes",
},
{
value: 4.0,
format: "number",
},
{
value: 150,
format: "currency",
},
{
value: null,
},
],
[
{
value: "",
},
],
[
{
value: "",
},
{
value: "",
},
{
value: "Total",
styles: {
is_bold: true,
font_size_in_pt: 12,
},
},
{
value: null,
styles: {
is_bold: true,
font_size_in_pt: 12,
},
},
{
value: "",
},
{
value: null,
styles: {
is_bold: true,
font_size_in_pt: 12,
},
},
],
],
formulas: [
{
row: 1,
col: 5,
expression: "=D2*E2",
},
{
row: 2,
col: 5,
expression: "=D3*E3",
},
{
row: 3,
col: 5,
expression: "=D4*E4",
},
{
row: 4,
col: 5,
expression: "=D5*E5",
},
{
row: 5,
col: 5,
expression: "=D6*E6",
},
{
row: 6,
col: 5,
expression: "=D7*E7",
},
{
row: 7,
col: 5,
expression: "=D8*E8",
},
{
row: 8,
col: 5,
expression: "=D9*E9",
},
{
row: 9,
col: 5,
expression: "=D10*E10",
},
{
row: 11,
col: 3,
expression: "=SUM(D2:D10)",
},
{
row: 11,
col: 5,
expression: "=SUM(F2:F10)",
},
],
}
],
});{
"success": true,
"data": {
"buffer": "UEsDBBQAAAAIAA...",
"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
}from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")
result = client.generate_sheet(
format="xlsx",
styles={
"header": {
"font_family": "Helvetica",
"font_size_in_pt": 11,
"is_bold": True,
"background_color": "#0D47A1",
"font_color": "#FFFFFF",
},
"body": {
"font_family": "Helvetica",
"font_size_in_pt": 11,
"font_color": "#333333",
},
},
sheets=[
{
"name": "Timesheet — March 17–21, 2026",
"columns": [
{
"name": "Date",
"width": 14,
},
{
"name": "Project",
"width": 28,
},
{
"name": "Task",
"width": 32,
},
{
"name": "Hours",
"width": 10,
},
{
"name": "Hourly Rate",
"width": 14,
},
{
"name": "Amount",
"width": 14,
},
],
"rows": [
[
{
"value": "2026-03-17",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Homepage wireframes",
},
{
"value": 4.5,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "2026-03-17",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Stakeholder feedback meeting",
},
{
"value": 1.5,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "2026-03-18",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Product listing page design",
},
{
"value": 6.0,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "2026-03-18",
"format": "date",
},
{
"value": "Meridian Mobile App",
},
{
"value": "API integration debugging",
},
{
"value": 2.0,
"format": "number",
},
{
"value": 150,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "2026-03-19",
"format": "date",
},
{
"value": "Meridian Mobile App",
},
{
"value": "Push notification service setup",
},
{
"value": 5.0,
"format": "number",
},
{
"value": 150,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "2026-03-19",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Checkout flow prototype",
},
{
"value": 3.0,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "2026-03-20",
"format": "date",
},
{
"value": "Meridian Mobile App",
},
{
"value": "User authentication flow",
},
{
"value": 7.0,
"format": "number",
},
{
"value": 150,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "2026-03-21",
"format": "date",
},
{
"value": "Oakwood E-Commerce Redesign",
},
{
"value": "Design review and revisions",
},
{
"value": 3.5,
"format": "number",
},
{
"value": 125,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "2026-03-21",
"format": "date",
},
{
"value": "Meridian Mobile App",
},
{
"value": "QA testing and bug fixes",
},
{
"value": 4.0,
"format": "number",
},
{
"value": 150,
"format": "currency",
},
{
"value": None,
},
],
[
{
"value": "",
},
],
[
{
"value": "",
},
{
"value": "",
},
{
"value": "Total",
"styles": {
"is_bold": True,
"font_size_in_pt": 12,
},
},
{
"value": None,
"styles": {
"is_bold": True,
"font_size_in_pt": 12,
},
},
{
"value": "",
},
{
"value": None,
"styles": {
"is_bold": True,
"font_size_in_pt": 12,
},
},
],
],
"formulas": [
{
"row": 1,
"col": 5,
"expression": "=D2*E2",
},
{
"row": 2,
"col": 5,
"expression": "=D3*E3",
},
{
"row": 3,
"col": 5,
"expression": "=D4*E4",
},
{
"row": 4,
"col": 5,
"expression": "=D5*E5",
},
{
"row": 5,
"col": 5,
"expression": "=D6*E6",
},
{
"row": 6,
"col": 5,
"expression": "=D7*E7",
},
{
"row": 7,
"col": 5,
"expression": "=D8*E8",
},
{
"row": 8,
"col": 5,
"expression": "=D9*E9",
},
{
"row": 9,
"col": 5,
"expression": "=D10*E10",
},
{
"row": 11,
"col": 3,
"expression": "=SUM(D2:D10)",
},
{
"row": 11,
"col": 5,
"expression": "=SUM(F2:F10)",
},
],
}
],
){
"success": true,
"data": {
"buffer": "UEsDBBQAAAAIAA...",
"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
}package main
import il "github.com/iterationlayer/sdk-go"
func main() {
client := il.NewClient("YOUR_API_KEY")
result, err := client.GenerateSheet(il.GenerateSheetRequest{
Format: "xlsx",
Styles: &il.SheetStyles{
Header: &il.CellStyle{
FontFamily: "Helvetica",
FontSizeInPt: 11,
IsBold: true,
BackgroundColor: "#0D47A1",
FontColor: "#FFFFFF",
},
Body: &il.CellStyle{
FontFamily: "Helvetica",
FontSizeInPt: 11,
FontColor: "#333333",
},
},
Sheets: []il.Sheet{
{
Name: "Timesheet — March 17–21, 2026",
Columns: []il.SheetColumn{
{
Name: "Date",
Width: 14,
},
{
Name: "Project",
Width: 28,
},
{
Name: "Task",
Width: 32,
},
{
Name: "Hours",
Width: 10,
},
{
Name: "Hourly Rate",
Width: 14,
},
{
Name: "Amount",
Width: 14,
},
},
Rows: []il.SheetRow{
{
{
Value: "2026-03-17",
Format: "date",
},
{
Value: "Oakwood E-Commerce Redesign",
},
{
Value: "Homepage wireframes",
},
{
Value: 4.5,
Format: "number",
},
{
Value: 125,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "2026-03-17",
Format: "date",
},
{
Value: "Oakwood E-Commerce Redesign",
},
{
Value: "Stakeholder feedback meeting",
},
{
Value: 1.5,
Format: "number",
},
{
Value: 125,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "2026-03-18",
Format: "date",
},
{
Value: "Oakwood E-Commerce Redesign",
},
{
Value: "Product listing page design",
},
{
Value: 6.0,
Format: "number",
},
{
Value: 125,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "2026-03-18",
Format: "date",
},
{
Value: "Meridian Mobile App",
},
{
Value: "API integration debugging",
},
{
Value: 2.0,
Format: "number",
},
{
Value: 150,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "2026-03-19",
Format: "date",
},
{
Value: "Meridian Mobile App",
},
{
Value: "Push notification service setup",
},
{
Value: 5.0,
Format: "number",
},
{
Value: 150,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "2026-03-19",
Format: "date",
},
{
Value: "Oakwood E-Commerce Redesign",
},
{
Value: "Checkout flow prototype",
},
{
Value: 3.0,
Format: "number",
},
{
Value: 125,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "2026-03-20",
Format: "date",
},
{
Value: "Meridian Mobile App",
},
{
Value: "User authentication flow",
},
{
Value: 7.0,
Format: "number",
},
{
Value: 150,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "2026-03-21",
Format: "date",
},
{
Value: "Oakwood E-Commerce Redesign",
},
{
Value: "Design review and revisions",
},
{
Value: 3.5,
Format: "number",
},
{
Value: 125,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "2026-03-21",
Format: "date",
},
{
Value: "Meridian Mobile App",
},
{
Value: "QA testing and bug fixes",
},
{
Value: 4.0,
Format: "number",
},
{
Value: 150,
Format: "currency",
},
{
Value: nil,
},
},
{
{
Value: "",
},
},
{
{
Value: "",
},
{
Value: "",
},
{
Value: "Total",
Styles: &il.CellStyle{
IsBold: true,
FontSizeInPt: 12,
},
},
{
Value: nil,
Styles: &il.CellStyle{
IsBold: true,
FontSizeInPt: 12,
},
},
{
Value: "",
},
{
Value: nil,
Styles: &il.CellStyle{
IsBold: true,
FontSizeInPt: 12,
},
},
},
},
Formulas: []il.Formula{
{
Row: 1,
Col: 5,
Expression: "=D2*E2",
},
{
Row: 2,
Col: 5,
Expression: "=D3*E3",
},
{
Row: 3,
Col: 5,
Expression: "=D4*E4",
},
{
Row: 4,
Col: 5,
Expression: "=D5*E5",
},
{
Row: 5,
Col: 5,
Expression: "=D6*E6",
},
{
Row: 6,
Col: 5,
Expression: "=D7*E7",
},
{
Row: 7,
Col: 5,
Expression: "=D8*E8",
},
{
Row: 8,
Col: 5,
Expression: "=D9*E9",
},
{
Row: 9,
Col: 5,
Expression: "=D10*E10",
},
{
Row: 11,
Col: 3,
Expression: "=SUM(D2:D10)",
},
{
Row: 11,
Col: 5,
Expression: "=SUM(F2:F10)",
},
},
},
},
})
if err != nil {
panic(err)
}
_ = result
}{
"success": true,
"data": {
"buffer": "UEsDBBQAAAAIAA...",
"mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
}
}