This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| == 引言 == | |
| 最近要用Perl写个处理包含中文的XLSX文件的小脚本,折腾了好半天才搞定中文处理,记录下来方便日后查询。 | |
| == 背景 == | |
| * 读XLSX文件使用[[https://metacpan.org/pod/Spreadsheet::XLSX|Spreadsheet::XLSX]] | |
| * 写XLSX文件使用[[https://metacpan.org/pod/Excel::Writer::XLSX|Excel::Writer::XLSX]] | |
| * *Microsoft Excel 2007* 之后的xlsx格式,实际是ZIP+XML(将xlsx文件重名名为zip,而后再用winzip提取文件就可看到内部的xml文件),所以只能是utf-8编码。 | |
| {{{ | |
| --- eg.xml --- | |
| <hello>大家好<\hello> |