Use
oExcel := TOleAuto():New( "Excel.Application" ) if you have Excel on the machine preparing the file
There are some libraries out there as well that you can use if excel is not available
Example quick and nasty
Local oExcel, oSheet , i
try
oExcel = CREATEOBJECT( "Excel.Application" )
catch oErr
Alert( "Excel not found on this machine therefore cannot run" )
return
end
oExcel:WorkBooks:Add()
oSheet = oExcel:ActiveSheet
for i = 1 to 100
oSheet:Cells( i, 01 ):Value = i
oSheet:Cells( i, 02 ):Value = "This a column 2"
// etc
// etc
next
oExcel:Visible = .T.
RELEASE
oSheet
RELEASE oExcel
See VBA for Excel for more info