MS Excel Vba 阿拉伯语 unicode

编程入门 行业动态 更新时间:2024-10-27 21:12:51
本文介绍了MS Excel Vba 阿拉伯语 unicode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我有一个文本文件和一个启用宏的 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-17 04:46:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/904393.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:阿拉伯语   Excel   MS   unicode   Vba

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!