Open bhuvanaurora opened 8 years ago
const workbook = new excel.Workbook();
const worksheet = workbook.addWorksheet('Sheet 1');
worksheet.cell(1, 1).string('😂');
workbook.writeToBuffer();
Invalid Character for XML "�" in string "😂"
This is caused by stringSetter
in source/lib/cell/index.js
let chars, chr;
chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/;
chr = val.match(chars);
if (chr) {
logger.warn('Invalid Character for XML "' + chr + '" in string "' + val + '"');
val = val.replace(chr, '');
}
Can you provide a gist that reproduces this issue? Thanks!