Ehab Samir Aziz wrote:select 3
use mach index mach3
set filter to alltrim(3->mc_cu_acct)=="2125447"
First, I advise you, to open files without "area number" and afterward use only its alias:
use mach index mach3 NEW
Sele mach3
Ehab Samir Aziz wrote:How can I write fixed headers to fields written to Excel sheet using OLE
a) One way:
FOR nCol := 1 TO FCOUNT()
oSheet:Cells( nRow, nCol ):Value := FieldName( nCol )
NEXT
WHILE !EOF()
nLine++
FOR nCol := 1 TO FCOUNT()
oSheet:Cells( nLine, nCol ):Value := FieldGet( nCol )
NEXT
DBSKIP()
ENDDO
b) Another way:
oSheet:Cells( 3, 1 ):Value := "TYPE"
oSheet:Cells( 3, 2 ):Value := "MODEL"
oSheet:Cells( 3, 3 ):Value := "SERIAL"
oSheet:Range( "A3"):HorizontalAlignment:=7 // centered title
//
// set font and colors
FOR nCol := 1 TO FCOUNT()
oSheet:Cells( 3, nCol ):Font:Size := 10
oSheet:Cells( 3, nCol ):Font:Bold := .t.
oSheet:Cells( 3, nCol ):Font:Color:= 8388608
NEXT