exceptions.py 928 B

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