DynaPDF.Table.SetColOrRowSpan
-----------------------------

Sets col or row span for a specific cell.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [16.2](newinversion162.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.Table.SetColOrRowSpan"; Table; Row; Col; Span; IsColSpan ) 

**MBS**( **"DynaPDF.Table.SetColOrRowSpan";** /\* Sets col or row span for a specific cell. \*/  
**$Table**; /\* The identifier for the table. \*/   
**$Row**; /\* The row number. Range from 0 to [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)-1. Pass -1 for all rows.e.g. 0 \*/   
**$Col**; /\* The column number. Range from 0 to [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)-1. Pass -1 for all columns.e.g. 0 \*/   
**$Span**; /\* Col or row span (must be greater 1)e.g. 1 \*/   
**$IsColSpan**) /\* If true, col span is set, row span otherwise.e.g. true \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Table | The identifier for the table. | $Table |
| Row | The row number. Range from 0 to [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)-1. Pass -1 for all rows. | 0 |
| Col | The column number. Range from 0 to [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)-1. Pass -1 for all columns. | 0 |
| Span | Col or row span (must be greater 1) | 1 |
| IsColSpan | If true, col span is set, row span otherwise. | true |

### Result

Returns OK or error.

### Description

Sets col or row span for a specific cell.  
The parameter Value must be greater 1 and Row and Col must be valid row and column indexes.  
  
Contents of spanned cells will be deleted. Only contents of the cell that defines col or row span is  
drawn.  
  
It is allowed to set Value to a higher value than columns or rows are currently available. The value is adjusted to the valid range when the table is drawn or when the height is calculated.  
  
Note that spanned cells cannot overlap. The function checks whether col or row span was already defined in the desired range.  
### Examples

Merge two columns:

 Set Variable \[ $r ; Value: MBS ("DynaPDF.Table.SetColOrRowSpan"; $table ; $rowNum ; $col ; 2; True) \]  
Merge two rows:

 Set Variable \[ $r ; Value: MBS ("DynaPDF.Table.SetColOrRowSpan"; $table ; $rowNum ; 1; 2; False) \]  
### See also

- [DynaPDF.Table.GetNumCols](DynaPDFTableGetNumCols.md)
- [DynaPDF.Table.GetNumRows](DynaPDFTableGetNumRows.md)
- [DynaPDF.Table.SetColor](DynaPDFTableSetColor.md)
- [DynaPDF.Table.SetColorFloat](DynaPDFTableSetColorFloat.md)

### Release notes

- **Version 16.2**
    - Added [DynaPDF.Table.SetColOrRowSpan](https://www.mbsplugins.eu/DynaPDFTableSetColOrRowSpan.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin 16.2 News](https://www.mbsplugins.de/archive/2026-05-20/MBS_FileMaker_Plugin_162_News/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 16.2 für Claris FileMaker](https://www.mbsplugins.de/archive/2026-05-05/Neues_MBS_Plugin_162_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 16.2 for Claris FileMaker](https://www.mbsplugins.de/archive/2026-05-05/MBS_Plugin_162_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 16.2pr5](https://www.mbsplugins.de/archive/2026-05-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 1st May 2026 , last changed 1st May 2026

  
[DynaPDF.Table.SetCellText](DynaPDFTableSetCellText.md) - [DynaPDF.Table.SetColWidth](DynaPDFTableSetColWidth.md)

[HTML Version](DynaPDFTableSetColOrRowSpan.shtml)