exceptions.py 889 B

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright (c) 2010-2024 openpyxl
  2. """Definitions for openpyxl shared exception classes."""
  3. class CellCoordinatesException(Exception):
  4. """Error for converting between numeric and A1-style cell references."""
  5. class IllegalCharacterError(Exception):
  6. """The data submitted which cannot be used directly in Excel files. It
  7. must be removed or escaped."""
  8. class NamedRangeException(Exception):
  9. """Error for badly formatted named ranges."""
  10. class SheetTitleException(Exception):
  11. """Error for bad sheet names."""
  12. class InvalidFileException(Exception):
  13. """Error for trying to open a non-ooxml file."""
  14. class ReadOnlyWorkbookException(Exception):
  15. """Error for trying to modify a read-only workbook"""
  16. class WorkbookAlreadySaved(Exception):
  17. """Error when attempting to perform operations on a dump workbook
  18. while it has already been dumped once"""