FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour EXCEL and FWH
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM

EXCEL and FWH

Posted: Fri Mar 24, 2006 12:48 PM
Thanks Antonio your sample buildexcel is working I found the test word written to A1 cell.

May I write a function writecells() as below instead of the "test" even this done I found no exported method cells in writecells(nline,oSheet).

   
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 1 ), "Value", writecells(nline,oSheet) )
..

function writecells(nline,oSheet)
*-------------------------------
select 3
use mach
3->(DBGOTOP()) 
DO WHILE !(3)->(EOF()) 
oSheet:Cells( nLine, 1 ):Value = (3)->mc_serial
oSheet:Cells( nLine, 2 ):Value = (3)->mc_name
nLine:=nLine+1 
(3)->(DBSKIP(1)) 
ENDDO 
return nil
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM

EXCEL and FWH

Posted: Fri Mar 24, 2006 01:13 PM
Ok Thanks Antonio,
I got it . I put the following loop. It works.

select 3
use mach
3->(DBGOTOP()) 
DO WHILE !(3)->(EOF())
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 1 ), "Value", (3)->mc_type )
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 2 ), "Value", (3)->mc_model )
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 3 ), "Value", (3)->mc_serial )
OleSetProperty( OleGetProperty( oSheet, "Cells", nLine, 4 ), "Value", (3)->mc_brn ) 
nLine:=nLine+1 
(3)->(DBSKIP(1)) 
ENDDO

Continue the discussion