source/lib/cell/index.js
function removeInvalidXml(str) {
    return Array.from(str).map(c => {
        const cp = c.codePointAt(0);
        if (cp >= 65536 && cp <= 1114111) {
            return c
        } else if (c.match(validXmlRegex)) {
            return c;
        } else {
            return '';
        }
    }).join('');
}
function removeInvalidXml(str) {
    return Array.from(str).map(c => {
        const cp = c.codePointAt(0);
        if (cp >= 65536 && cp <= 1114111) {
            return c
        } else if (c.match(validXmlRegex)) {
            return c;
        } else {
            return '';
        }
    }).join('');
}
The list of valid characters is
#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

We need to test codepoints numerically, instead of regex characters above 65536 (0x10000),