Page 11 of 16
Re: Migrating to Harbour
Posted: Mon Dec 22, 2014 6:14 pm
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
Re: Migrating to Harbour
Posted: Mon Dec 22, 2014 6:22 pm
by James Bott
There is another discussion about this topic here:
viewtopic.php?f=3&t=26463'Maybe it will helps, but I don't see any answer there.
Re: Migrating to Harbour
Posted: Mon Dec 22, 2014 6:33 pm
by Enrico Maria Giordano
James,
unfortunately it looks like a different problem.
![Sad :-(](./images/smilies/icon_sad.gif)
EMG
Re: Migrating to Harbour
Posted: Mon Dec 22, 2014 9:15 pm
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
Re: Migrating to Harbour
Posted: Mon Dec 22, 2014 9:58 pm
by Enrico Maria Giordano
Antonio,
the sample I already reported is without FWH. Here it is again:
Code: Select all | Expand
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
Re: Migrating to Harbour
Posted: Mon Dec 22, 2014 10:02 pm
by Antonio Linares
Re: Migrating to Harbour
Posted: Mon Dec 22, 2014 10:11 pm
by Enrico Maria Giordano
Antonio,
thank you!
![Smile :-)](./images/smilies/icon_smile.gif)
EMG
Re: Migrating to Harbour
Posted: Tue Dec 23, 2014 9:56 pm
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
![Smile :-)](./images/smilies/icon_smile.gif)
Re: Migrating to Harbour
Posted: Tue Dec 23, 2014 10:19 pm
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
Re: Migrating to Harbour
Posted: Tue Dec 23, 2014 10:52 pm
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
Re: Migrating to Harbour
Posted: Tue Dec 23, 2014 10:55 pm
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
Re: Migrating to Harbour
Posted: Tue Dec 23, 2014 11:00 pm
by Antonio Linares
Enrico,
When you use an empty date with xHarbour what value do you get in the Excel cell ?
Re: Migrating to Harbour
Posted: Tue Dec 23, 2014 11:48 pm
by cnavarro
Enrico
This expression works?
Re: Migrating to Harbour
Posted: Wed Dec 24, 2014 2:10 am
by richard-service
cnavarro wrote:Enrico
This expression works?
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 )
Re: Migrating to Harbour
Posted: Wed Dec 24, 2014 7:49 am
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