writer creates corrupted file if you write bogus characters
Created originally on Bitbucket by Anonymous
not sure if this is a bug in the writer, but it would sure be nice if it handled it. It turns out that I have some garbage data in my database (chr(31), to be exact). When my program wrote out an Excel workbook, the file was corrupted. OpenOffice did not complain (it just seemed to remove the entry in sharedStrings.xml, which led to a very unexpected sheet. Excel at least complained about an "invalid XML character" and gave me a file of what was "fixed" (then displayed the same unexpected sheet).