Page 2 of 2

PostPosted: Fri Mar 24, 2006 12:48 pm
by Ehab Samir Aziz
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

PostPosted: Fri Mar 24, 2006 1:13 pm
by Ehab Samir Aziz
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