MS Excel Vba 阿拉伯语 unicode [英] MS Excel Vba Arabic unicode

查看:33
本文介绍了MS Excel Vba 阿拉伯语 unicode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本文件和一个启用宏的 Excel 文件.excel文件从每行的文本文件中获取(使用vba)字符串(阿拉伯语文本),然后将其放在sheet1单元格上.问题是字符串没有正确显示.它以随机的日文字符显示.(我的 Windows 语言环境是日本).

I have a text file and a macro enabled excel file. the excel file gets (using vba) the string (arabic text) from the text file per line then put it on the sheet1 cells. The problem is the string is not properly displayed. It is displayed in random Japanese characters. (My windows locale is Japan).

这是我的代码:

Open FilePath For Inputs As #1

Do Until EOF(1)

Line Input #1, textline
ActiveWorkbook.sheets(1).Cell(1,1).Value = textline
 'MsgBox(textline)

Loop

Close#1

问题:如何让字符串(阿拉伯语文本)在粘贴到 excel 文件时仍然是阿拉伯语?

Question: How can I get the string(arabic text) to be still arabic when pasted in the excel file?

推荐答案

找到了使用 Excel 女士的方法.在数据"选项卡下 > 从文本导入数据.不要忘记将编码设置为 UTF-8

Found a way around using Ms Excel. Under Data tab > Import Data from text. Dont forget to set the encoding to UTF-8

瞧!魔法!

这篇关于MS Excel Vba 阿拉伯语 unicode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆