Warning "In write-only mode you must add table columns manually"
In worksheet.py
from around line 564, we have this:
def add_table(self, table):
"""
Check for duplicate name in definedNames and other worksheet tables
before adding table.
"""
if self.parent._duplicate_name(table.name):
raise ValueError("Table with name {0} already exists".format(table.name))
if not hasattr(self, "_get_cell"):
warn("In write-only mode you must add table columns manually")
self._tables.add(table)
I think a warning here is too drastic. Warnings should be when for when something happens that might be problematic, but not promlematic enough to terminate the program. See https://docs.python.org/3/library/warnings.html . However, here it is used simply as a reminder to the programmer. This is not good, because the person seeing the messages is not the programmer, but the end user.
Suggested solution: Remove these lines:
if not hasattr(self, "_get_cell"):
warn("In write-only mode you must add table columns manually")