如何使用Insert Into将阿拉伯语CSV文件导入MS Access表 [英] How to import Arabic CSV file into MS Access table using Insert Into

查看:152
本文介绍了如何使用Insert Into将阿拉伯语CSV文件导入MS Access表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含阿拉伯字符的Excel电子表格。如果我在编辑器中查看CSV,当我将电子表格导出为CSV时,除非我更改区域设置,否则它看起来很乱。我需要做的是循环(使用VB6)CSV的每一行,并在CSV的每一行中插入INSERT INTO。虽然我不需要以这种方式导入数据的帮助,但是当导入阿拉伯字符时,它们会使用正确的区域设置进行乱码。 INSERT INTO中有什么东西告诉数据库(MS Access),导入的字符是阿拉伯语类型吗?希望这至少足以启动。



谢谢

I have an excel spreadsheet that has Arabic characters. When I export the spreadsheet as a CSV if I look at the CSV in an editor it looks garbled unless I change the regional settings. What I need to do is to cycle through (using VB6) each line of the CSV and do an INSERT INTO into a table each line of the CSV. Though I don't need help with importing data in this way, when the arabic characters are imported they are garbled ever with the correct regional setting. Is there something in the INSERT INTO or something else to tell the database (MS Access), the characters being imported are of the Arabic type? Hope that is enough info at least to start.

Thanks

推荐答案

VBA解决方案:

我建议您使用: TransferText Method [ ^ ]与 CodePage (表示代码页的字符集的Long值)作为参数。

许多有趣的例子: Excel导入 [ ^ ]



.NET解决方案:

使用OleDb导入文本文件(选项卡,CSV,自定义) [ ^ ]

http:// www .connectionstrings.com / textfile [ ^ ]
VBA solution:
I would suggest you to use: TransferText Method[^] with CodePage (a Long value indicating the character set of the code page) as a parameter.
Many interesting examples: Excel Import[^]

.NET solution:
Using OleDb to Import Text Files (tab, CSV, custom)[^]
http://www.connectionstrings.com/textfile[^]


解决方案是确保CSV导出是Unicode,然后我不必担心操作系统区域设置的代码页。
The solution was to make sure the CSV export was in Unicode, then I did not have to worry about the codepage of the operating system regional setting.


这篇关于如何使用Insert Into将阿拉伯语CSV文件导入MS Access表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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