FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Unicode and Excel
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Unicode and Excel
Posted: Wed Dec 09, 2015 09:46 PM
Using FWH and Harbour:
Code (fw): Select all Collapse
// Build with Harbour and FWH

#include "fivewin.ch"

function Main()

   local oExcel, oBook, oSheet
   local n

   FW_SetUnicode( .T. )
   HB_CDPSELECT( "UTF8" )

   oExcel      := ExcelObj()
   oBook       := oExcel:WorkBooks:Add()
   oSheet      := oBook:ActiveSheet

   oSheet:Cells( 1, 1 ):Value    := "TELUGU"
   oSheet:Cells( 1, 2 ):Value    := "HINDI"
   oSheet:Cells( 1, 3 ):Value    := "CHINESE"

   oSheet:Cells( 2, 1 ):Value    := "రామ చంద్ర మూర్తి"
   oSheet:Cells( 3, 1 ):Value    := "సాంబ శివ రావు"
   oSheet:Cells( 4, 1 ):Value    := "మురళిధర"

   oSheet:Cells( 2, 2 ):Value    := "सर्वे जनम सुखिनो भवतु"
   oSheet:Cells( 3, 2 ):Value    := "वसुधैका कुटुम्बम"
   oSheet:Cells( 4, 2 ):Value    := "ॐ शांति शांति शांति"

   oSheet:Cells( 2, 3 ):Value    := "我們都是一家人。"
   oSheet:Cells( 3, 3 ):Value    := "中國是一個大國"
   oSheet:Cells( 4, 3 ):Value    := "隨著最熱情的問候"


   for n := 1 to 3
      oSheet:Columns( n ):AutoFit()
   next

   oExcel:Visible := .t.

return nil




I am able to work with Excel with other languages from FWH with Harbour.
I still could not figure out if this is possible with xHarbour.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1286
Joined: Mon Feb 25, 2008 02:54 PM
Re: Unicode and Excel
Posted: Sat Aug 27, 2016 12:49 PM

Sr. nageswaragunupudi,

Path and name: C:\fwh1604\samples\TESTE2.exe (32 bits)
Size: 3,381,760 bytes
Compiler version: Harbour 3.2.0dev (r1506171039)
FiveWin Version: FWH 16.04
Windows version: 6.1, Build 7601 Service Pack 1

Time from start: 0 hours 0 mins 0 secs
Error occurred at: 08/27/16, 09:48:19
Error description: (DOS Error -2147352567) WINOLE/1007 Não é possível obter a propriedade Add da classe Workbooks (0x800A03EC): Microsoft Office Excel

Stack Calls

Called from: => TOLEAUTO:ADD( 0 )
Called from: teste2.prg => MAIN( 14 )

ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Unicode and Excel
Posted: Sat Aug 27, 2016 04:35 PM
Thanks for sample, Mr Rao

Run ok for me ( Windows 10, Office 2010 )

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Unicode and Excel
Posted: Fri Sep 02, 2016 02:16 AM
Dear Mr.Rao,

I haven't got the same. I used FWH1606+xHb1506+BCC7 and save file as UTF8-NO BOM already, Windows10 + Office2010.
click image upload
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Unicode and Excel
Posted: Fri Sep 02, 2016 02:23 AM
I said this already in my post
I am able to work with Excel with other languages from FWH with Harbour.
I still could not figure out if this is possible with xHarbour.


Harbour implemented support for Unicode.
I do not see this with xHarbour ( naturally xHb also )

In my personal opinion, serious Unicode applications better use Harbour than xHarbour.
Otherwise, live with the limitations of xHarbour, which are not many ofcourse.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: Unicode and Excel
Posted: Fri Sep 02, 2016 07:20 AM

Dear Mr.Rao,

I will try to change to Harbour.
Have you know what is the difference between Harbour and xHarbour?

Thanks in advance.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1067
Joined: Wed Nov 09, 2005 02:17 AM
Re: Unicode and Excel
Posted: Fri Sep 02, 2016 10:57 AM
If you are using HBCOMPAT.CH e XHB.LIB, you will need modify almost nothing and harbour Works very much better!

See this:
https://code.google.com/p/harbour-and-xharbour-builds/downloads/detail?name=xhb-diff.txt
Sds,
Vilian F. Arraes
vilian@vfatec.com.br
Belém-Pa-Brazil

Continue the discussion