---
source: https://carbone.io/examples/shoes/
title: "Store Inventory Table with Bidirectional Loop | Carbone Sample"
description: "Learn how to generate professional store inventory tables using our document generator tool. Create DOCX, PPTX, XLSX, HTML, and XML documents by merging JSON data with templates. Start automating your document workflow today!"
generated_at: "2026-07-13"
---

# Store Inventory

Present your inventory

[![shoes thumbnail](/examples/shoes/thumb-result.webp)](/examples/shoes/result.pdf)

[Download Template](/examples/shoes/template.docx)

[Download data sample](/examples/shoes/data.json)

-   Template type document docx simple
-   Carbone min. v4.24.0+
-   Features bidirectional-loop placeholder
-   Target product comparator insurance technology

## Overview

Create a professional store inventory report that includes:

-   Structured table format for clear data presentation
-   Horizontal loops to display different product sizes
-   Automatic calculation of inventory totals
-   Visual data representation through charts

## Step-by-Step Guide

Follow these steps to create your inventory template using Carbone:

### 1\. Create the Basic Table Structure

-   Insert [Carbone tags](/documentation/design/substitutions/the-basics.md) to read data from your [array](/documentation/design/substitutions/the-basics.md#accessing-arrays): `{d.products[i].brand}` and `{d.products[i].model}`
-   Add the iterator `[i+1]` in the row below for vertical iteration: `{d.products[i+1]}`

> ℹ️ **Note:** You only need one tag with `[i+1]` to enable iteration

### 2\. Set Up Horizontal Repetition

-   Add Carbone tags to read array data: `{d.allSize[size].size}`
-   In the adjacent cell, define horizontal iteration: `{d.allSize[size+1].size}`
-   Repeat this pattern for all data that needs horizontal display: `{d.products[i].size[size].qty}` and `{d.products[i].size[size+1].qty}`

### 3\. Add Calculations

-   Use the [:aggSum](/documentation/design/computation/aggregation.md#learn-with-aggsum-partitionby) formatter to calculate total sums: `{d.products[i].size[].qty:aggSum}`

### 4\. Insert Charts

-   Add a [chart](/documentation/design/advanced-features/charts.md#docx-example) with your desired design
-   Configure the chart data:
    1.  Right-click the chart and select "Edit Data in Excel" (or wait for Excel to open automatically)
    2.  Define your data series using Carbone tags and iteration:
        
        ```text
        |                        | Size                       |
        |-----------------------------------------------------|
        | {d.allSize[i].size}    | {d.allSize[i].totalQty}    |
        | {d.allSize[i+1].size}  | {d.allSize[i+1].totalQty}  |
        ```
        
-   The chart will update automatically during report generation

Your template is now ready to generate professional store inventory reports!

## Related Examples

[![label-barcode thumbnail example](/examples/label-barcode/thumb-result.webp)](/examples/label-barcode/index.md)

## Trusted by 800+ paid customers in 40+ countries

## Related topics

- [Transport ticket](/examples/ticket/index.md)
- [Summary](/examples/summary/index.md)
- [Stock inventory spreadsheet](/examples/stock-inventory-spreadsheet/index.md)
- [Sensor readings](/examples/sensor-readings/index.md)
- [Real estate property document](/examples/real-estate-property-description/index.md)
- [Automation of Quotes](/examples/quote-with-datasheet/index.md)
