Last Updated:
13 Dec 2018 15:23
by ADMIN
SpreadStreamProcessing: ArgumentException is thrown when exporting characters not supported in XML
ArgumentException with clarification similar to "'\u001f', hexadecimal value 0x1F, is an invalid character." is thrown when trying to export document containing characters which are not supported in XML document - such as some control characters like 0x00, 0x1F, 0x1B, etc. Such characters are described in the XML specification here: https://www.w3.org/TR/xml/#charsets.
Although the escaped strings are not supported (see related 181318), the library could prevent the exception and export the document successfully by skipping such characters.
Workaround: remove such characters before the export. Check the following StackOverflow answer for some ideas on code for replacing the characters: http://stackoverflow.com/a/14323524/259206