我需要在Excel电子表格中将普通ASCII字符替换为Unicode字符。例如,将Ståle转换为Stale。
以下内容在Excel 2013中可以正常工作。但是,在Excel 2010中,问题字符显示为"?"。有什么想法吗?请注意,Excel 2010正确检测到非Ascii字符,但字符未显示。
char = Mid(val, i, 1)
char_code = AscW(char)
If char_code > 127 Then
MsgBox ("Problem with " & c.Address & " [" & char_code & "] " &
StrConv(ChrW(char_code), vbUnicode))
End If
我也尝试了仅仅是:
MsgBox ("Problem with " & char & " " & ChrW(char_code))
再次测试,它可以在Excel 2013中运行,但在Excel 2010中无法运行。