read data from excel and write into dbf (local language prob

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
apichit
Posts: 33
Joined: Thu Jun 07, 2012 9:39 am

read data from excel and write into dbf (local language prob

Post by apichit »

Hi all,
Help me please!
I wrote a small program to read data from excel and write into dbf file. I have problem about my local language. Customer Name in excel sheet is in my local language (Thai), when program read and write into dbf it show ???????? in customer name in dbf.
Attachments
exl2dbf.zip
(13.8 KiB) Downloaded 282 times
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: read data from excel and write into dbf (local language

Post by mol »

I've tried your sample, I've got something like that in Excel:
Image

Is it right?

You must remember to include file:

Code: Select all

#include "hbextcdp.ch"
to properly use codepages with excel and openoffice
and set codepage, eg:

Code: Select all

	HB_CDPSELECT("PLWIN")
Regards, Marek
apichit
Posts: 33
Joined: Thu Jun 07, 2012 9:39 am

Re: read data from excel and write into dbf (local language

Post by apichit »

Hi Marek,

Thank you very much for your help.
In excel is source data, it show correct customer name, but in dbf file, it shows ??? ? ??? in Customer name.

Regards, Apichit
Attachments
Shoptype.gif
Shoptype.gif (5.21 KiB) Viewed 3033 times
apichit
Posts: 33
Joined: Thu Jun 07, 2012 9:39 am

Re: read data from excel and write into dbf (local language

Post by apichit »

Thai (Thailand)
apichit
Posts: 33
Joined: Thu Jun 07, 2012 9:39 am

Re: read data from excel and write into dbf (local language

Post by apichit »

I have no idea about code page in HMG but I check from my Firefox, it has 2 as list below:
Thai(windows-874)
Thai(TIS-620)
Post Reply