FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Migrating to Harbour
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Migrating to Harbour

Posted: Mon Dec 22, 2014 06:14 PM
Antonio Linares wrote:is the same code working with xHarbour ?


Of course.

Antonio Linares wrote:Is Excel already running ?


No, but the problem is only with CTOD( "" ). With all other values it works fine, even with NIL.

EMG
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM

Re: Migrating to Harbour

Posted: Mon Dec 22, 2014 06:22 PM

There is another discussion about this topic here:

viewtopic.php?f=3t=26463'

Maybe it will helps, but I don't see any answer there.

&

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Migrating to Harbour

Posted: Mon Dec 22, 2014 06:33 PM

James,

unfortunately it looks like a different problem. :-(

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Migrating to Harbour

Posted: Mon Dec 22, 2014 09:15 PM

Enrico,

Could you please provide a small example without FWH to provide it to the Harbour developers list ?

This problem may affect to other users too

many thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Migrating to Harbour

Posted: Mon Dec 22, 2014 09:58 PM
Antonio,

the sample I already reported is without FWH. Here it is again:

Code (fw): Select all Collapse
FUNCTION MAIN()

    LOCAL oExcel := CREATEOBJECT( "Excel.Application" )

    LOCAL oSheet

    oExcel:WorkBooks:Add()

    oSheet = oExcel:ActiveSheet

    oSheet:Cells( 1, 1 ):Value = CTOD( "" )

    oExcel:Visible = .T.

    RETURN NIL


EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Migrating to Harbour

Posted: Mon Dec 22, 2014 10:02 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Migrating to Harbour

Posted: Mon Dec 22, 2014 10:11 PM

Antonio,

thank you! :-)

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Migrating to Harbour

Posted: Tue Dec 23, 2014 09:56 PM

Enrico,

Please read the above posted thread as there have been already several answers.

I appreciate if you can review them, thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Migrating to Harbour

Posted: Tue Dec 23, 2014 10:19 PM

Antonio,

I read the answers but found no solution. Are they suggesting that with Harbour I can't assign CTOD( "" ) to an Excel cell?

EMG

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Migrating to Harbour

Posted: Tue Dec 23, 2014 10:52 PM

According to Przemek it seems as that is a wrong date, and that is what OLE is reporting.

Have you tried to assign it a different date ?

thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Migrating to Harbour

Posted: Tue Dec 23, 2014 10:55 PM
Antonio,

Antonio Linares wrote:According to Przemek it seems as that is a wrong date, and that is what OLE is reporting.


So, what I have to do? I cannot change all my code, you know.

Antonio Linares wrote:Have you tried to assign it a different date ?


Yes. Empty date seems the only value that Harbour does not accept.

EMG
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Migrating to Harbour

Posted: Tue Dec 23, 2014 11:00 PM

Enrico,

When you use an empty date with xHarbour what value do you get in the Excel cell ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: Migrating to Harbour

Posted: Tue Dec 23, 2014 11:48 PM
Enrico
This expression works?

Code (fw): Select all Collapse
oSheet:Cells( 1, 1 ):Value = CTOD( "  /  /  " )
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: 866
Joined: Tue Oct 16, 2007 08:57 AM

Re: Migrating to Harbour

Posted: Wed Dec 24, 2014 02:10 AM
cnavarro wrote:Enrico
This expression works?

Code (fw): Select all Collapse
oSheet:Cells( 1, 1 ):Value = CTOD( "  /  /  " )


Same error below

Application
===========
Path and name: C:\DevelopProject\fwh64\samples\ole_excel.exe (64 bits)
Size: 3,712,000 bytes
Compiler version: Harbour 3.2.0dev (r1406271520)
FiveWin Version: FWH 14.12
Windows version: 6.1, Build 7601 Service Pack 1

Time from start: 0 hours 0 mins 8 secs
Error occurred at: 12/24/14, 10:08:40
Error description: (DOS Error -2147352567) WINOLE/1006 (0x800A03EC): _VALUE
Args:
[ 1] = D / /

Stack Calls
===========
Called from: => TOLEAUTO:_VALUE( 0 )
Called from: ole_excel.prg => MAIN( 13 )
Best Regards,



Richard



Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 32bit

MySQL v8.0

Harbour 3.2.0dev (r2503251254) => Borland C++ v7.7 64bit
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM

Re: Migrating to Harbour

Posted: Wed Dec 24, 2014 07:49 AM
Antonio,

Antonio Linares wrote:When you use an empty date with xHarbour what value do you get in the Excel cell ?


NIL

EMG