# Working with Spreadsheet Documents
Working with Spreadsheet Documents with GroupDocs.Assembly for Python via .NET: the template, the Python data and the code.
{{< alert style="info" >}}The example reads the shop data described in [The Business Layer]({{< ref "assembly/python-net/developer-guide/basic-usage/working-with-a-business-case/the-business-layer.md" >}}).{{< /alert >}}
## Working with Spreadsheet Documents
GroupDocs.Assembly allows you to use data bands in table rows in **Spreadsheet Documents**. A table-row data band is a data band which body occupies single or multiple rows of a single document table. The body of such a band starts at the beginning of the first occupied row and ends at the end of the last occupied row as follows. The syntax for using data bands in spreadsheet document is as follows:
| Manager |
Manager |
Contract Price |
| <<foreach [c in ds]>><<[c.Client]>> |
<<[c.Manager]>> |
<<[c.Price]>><</foreach>> |
### Working with Table-Row Conditional Blocks
You can also use a table-row conditional block which body occupies single or multiple rows of a single document table. The body of such a block (as well as the body of its every template option) starts at the beginning of the first occupied row and ends at the end of the last occupied row as follows:
| | | |
| ---------------------- | ------- | --------------- |
| **<<if ...>> ...** | **...** | **...** |
| **...** | **...** | **...** |
| **<<elseif ...>> ...** | **...** | **...** |
| **...** | **...** | **...** |
| **<<else>> ...** | **...** | **...** |
| **...** | **...** | **...** |
| **...** | **...** | **... <</if>>** |
| | | |
### Download
#### Data Source Document
* [data-table.xlsx](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-table-row-data-bands/working-with-spreadsheet-documents/data-table.xlsx)
#### Template
### The Code
{{< tabs "example1" >}}
{{< tab "Python" >}}
```python
from groupdocs.assembly import DataSourceInfo, DocumentAssembler
from groupdocs.assembly.data import DocumentTable, DocumentTableOptions
options = DocumentTableOptions()
options.first_row_contains_column_names = True
table = DocumentTable("contracts.xlsx", 0, options)
assembler = DocumentAssembler()
assembler.assemble_document("data-table.xlsx", "data-table-report.xlsx", DataSourceInfo(table, "ds"))
```
{{< /tab >}}
{{< tab "data-table.xlsx" >}}
{{< tab-text >}}
The following sample file is used in this example: [data-table.xlsx](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-table-row-data-bands/working-with-spreadsheet-documents/data-table.xlsx)
{{< /tab-text >}}
{{< /tab >}}
{{< tab "contracts.xlsx" >}}
{{< tab-text >}}
The following sample file is used in this example: [contracts.xlsx](https://docs.groupdocs.com/assembly/python-net/_sample_files/developer-guide/advanced-usage/working-with-table-row-data-bands/working-with-spreadsheet-documents/contracts.xlsx)
{{< /tab-text >}}
{{< /tab >}}
{{< tab "data-table-report.xlsx" >}}
```text
Binary file (XLSX, 9 KB)
```
[Download full output](https://docs.groupdocs.com/assembly/python-net/_output_files/developer-guide/advanced-usage/working-with-table-row-data-bands/working-with-spreadsheet-documents/the_code/data-table-report.xlsx)
{{< /tab >}}
{{< /tabs >}}