EXCEL and FWH

Postby Ehab Samir Aziz » 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).

Code: Select all  Expand view
   
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
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Postby Ehab Samir Aziz » Fri Mar 24, 2006 1:13 pm

Ok Thanks Antonio,
I got it . I put the following loop. It works.

Code: Select all  Expand view

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
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 153 guests