otld.append.caseload.find_matching_sheet¶
- otld.append.caseload.find_matching_sheet(sheet_names: List[str], pattern: str, file_path: str) str | None ¶
Find first sheet matching pattern
Iterates through sheets until a sheet matching the provided pattern is found. If not sheet is found, raises an AttributeError.
- Args:
sheet_names (List[str]): A list of sheet names. pattern (str): String identifying which type of sheet (families or recipients) is being searched for. file_path (str): Path to caseload file.
- Raises:
AttributeError: Raise AttributeError if no matching sheet can be found.
- Returns:
Optional[str]: A sheet name