Of course.Antonio Linares wrote:is the same code working with xHarbour ?
No, but the problem is only with CTOD( "" ). With all other values it works fine, even with NIL.Antonio Linares wrote:Is Excel already running ?
EMG
Of course.Antonio Linares wrote:is the same code working with xHarbour ?
No, but the problem is only with CTOD( "" ). With all other values it works fine, even with NIL.Antonio Linares wrote:Is Excel already running ?
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
So, what I have to do? I cannot change all my code, you know.Antonio Linares wrote:According to Przemek it seems as that is a wrong date, and that is what OLE is reporting.
Yes. Empty date seems the only value that Harbour does not accept.Antonio Linares wrote:Have you tried to assign it a different date ?
Same error belowcnavarro wrote:Enrico
This expression works?
Code: Select all
oSheet:Cells( 1, 1 ):Value = CTOD( " / / " )
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 )
NILAntonio Linares wrote:When you use an empty date with xHarbour what value do you get in the Excel cell ?