@@ -1536,6 +1536,35 @@ def get_cell_value(
15361536 err = res .err .decode (ENCODE )
15371537 return res .val .decode (ENCODE ), None if err == "" else Exception (err )
15381538
1539+ def get_col_outline_level (
1540+ self , sheet : str , col : str
1541+ ) -> Tuple [int , Optional [Exception ]]:
1542+ """
1543+ Get outline level of a single column by given worksheet name and column
1544+ name.
1545+
1546+ Args:
1547+ sheet (str): The worksheet name
1548+ col (str): The column name
1549+
1550+ Returns:
1551+ Tuple[int, Optional[Exception]]: A tuple containing the column
1552+ outline level and an exception if an error occurred, otherwise None.
1553+
1554+ Example:
1555+ For example, get outline level of column D in Sheet1:
1556+
1557+ .. code-block:: python
1558+
1559+ level, err = f.get_col_outline_level("Sheet1", "D")
1560+ """
1561+ lib .GetColOutlineLevel .restype = types_go ._IntErrorResult
1562+ res = lib .GetColOutlineLevel (
1563+ self .file_index , sheet .encode (ENCODE ), col .encode (ENCODE )
1564+ )
1565+ err = res .err .decode (ENCODE )
1566+ return res .val , None if err == "" else Exception (err )
1567+
15391568 def get_col_style (self , sheet : str , col : str ) -> Tuple [int , Optional [Exception ]]:
15401569 """
15411570 Get column style ID by given worksheet name and column name.
0 commit comments