Unicode and Excel

Unicode and Excel

Postby nageswaragunupudi » Wed Dec 09, 2015 9:46 pm

Using FWH and Harbour:
Code: Select all  Expand view
// 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
 


Image

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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Unicode and Excel

Postby MGA » 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
MGA
 
Posts: 1249
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: Unicode and Excel

Postby cnavarro » Sat Aug 27, 2016 4:35 pm

Thanks for sample, Mr Rao

Run ok for me ( Windows 10, Office 2010 )

Image
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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Unicode and Excel

Postby dutch » Fri Sep 02, 2016 2: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.
Imageclick image upload
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1540
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Unicode and Excel

Postby nageswaragunupudi » Fri Sep 02, 2016 2: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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Unicode and Excel

Postby dutch » Fri Sep 02, 2016 7: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 19.01 / 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)
User avatar
dutch
 
Posts: 1540
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: Unicode and Excel

Postby vilian » 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
User avatar
vilian
 
Posts: 972
Joined: Wed Nov 09, 2005 2:17 am
Location: Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 67 guests