Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Posted
Comments
Sergey Alexandrovich Kryukov 28-Jun-13 14:43pm    
Well, what's the encoding on input? And what do you want from VB6, honestly? What exactly goes wrong?
—SA

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[^]
 
Share this answer
 
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900