chuanyi / msexcel-builder

A simple and fast library to create MS Office Excel(>2007) xlsx files.
MIT License
184 stars 130 forks source link

关于表情符号的解析问题 #18

Open linxingfang opened 9 years ago

linxingfang commented 9 years ago
at XMLStringifier.module.exports.XMLStringifier.assertLegalChar (C:\work\wechat_manager\node_modules\msexcel-builder\node_modules\xmlbuilder\lib\XMLStringifier.js:150:15)

解决办法, //if (chr) { // throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); //}

为何作此判断?

chuanyi commented 9 years ago

抱歉,可能得问xmlbuilder的作者了,我也不了解

linxingfang commented 9 years ago

那可不可以增加对表情符号的解析?

aksris commented 9 years ago

can you at least handle the error please?

aksris commented 9 years ago

ok was able to fix this issue! just add the following line to every Sheet.prototype.toxml = function():

allowSurrogateChars: true