Migrating to Harbour

User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post by Enrico Maria Giordano »

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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Migrating to Harbour

Post by James Bott »

There is another discussion about this topic here:

http://forums.fivetechsupport.com/viewt ... =3&t=26463'

Maybe it will helps, but I don't see any answer there.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post by Antonio Linares »

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post by Enrico Maria Giordano »

Antonio,

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

Code: Select all

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post by Antonio Linares »

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post by Enrico Maria Giordano »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post by Antonio Linares »

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post by Enrico Maria Giordano »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migrating to Harbour

Post by Antonio Linares »

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

Re: Migrating to Harbour

Post by cnavarro »

Enrico
This expression works?

Code: Select all

oSheet:Cells( 1, 1 ):Value = CTOD( "  /  /  " )
 
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
richard-service
Posts: 583
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan
Contact:

Re: Migrating to Harbour

Post by richard-service »

cnavarro wrote:Enrico
This expression works?

Code: Select all

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 )
Regards,

Richard

Harbour 3.2.0dev (r1904111533)/xHarbour 1.2.3 Intl. (SimpLex) (Build 20180818) => Borland C++ v7.4
xHarbour 0.99.71 (SimpLex) => Borland C++ v5.5
MySQL v5.7 /ADS v12
Harbour 3.2.0dev (r1603181642) => Borland C++ v7.4 64bit
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Migrating to Harbour

Post by Enrico Maria Giordano »

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

EMG
Post Reply