Corrupt excel from whitespace in any worksheet property
as posted on stackoverflow see https://stackoverflow.com/questions/68572171/corrupt-excel-from-openpyxl-from-trailing-space-in-worksheet-property
basically whitespace in a property will trigger an xml:space='preserve' to be injected into the xml , based on functions.py
def whitespace(node):
if node.text != node.text.strip():
node.set("{%s}space" % XML_NS, "preserve")
This upsets excel, which doesnt seem to like this attribute in its document properties document.
workaround is to strip all whitespace before setting a property.