tbl_multicell_size
[0|2] = tbl_multicell_size(cellId, array)
This function returns the number of rows and columns occupied by multicell cellId in the output array. The first array element contains the row count, and the second array element contains the cell count. The function returns a value of 0 if the cell is either not in a multicell or the cellId is invalid. Otherwise, the function returns a value of 2.
The following example returns the number of rows or cells spanned by a given cell based on its oid. Note that this example might be used by a FOSI system-func call, so the window argument is required but not used.
function row_count(window,oid) {
return span_count($window,$oid,1);
}
function col_count(window,oid) {
return span_count($window,$oid,0);
}
function span_count(window,oid,rowchk) {
local rowcount;
local colcount;
local size[];
if (!tbl_cell_in_multicell(tbl_oid_cell($oid))) {
return 1;
}
tbl_multicell_size(tbl_oid_cell($oid), size);
rowcount = size[1];
colcount = size[2];
if ($rowchk == 1) {
return rowcount;
} else {
return colcount;
}
}