atomica.excel.validate_category

atomica.excel.validate_category(workbook, expected_category)[source]

Check Atomica workbook type

This function makes sure that a workbook has a particular category property stored within it, and displays an appropriate error message if not. If the category isn’t present or doesn’t start with ‘atomica’, just ignore it for robustness (instead, a parsing error will likely be raised)

Parameters
  • workbook – An openpyxl workbook

  • category – The expected string category

Raises

Exception if the workbook category is not valid

Return type

None