CREATE CURSOR testsub (date1 d(8),sno n(2),cash n(2),weight n(2)) INSERT INTO testsub VALUES ({^2007/01/01},1,100,10) INSERT INTO testsub VALUES ({^2007/01/01},2,150,20) INSERT INTO testsub VALUES ({^2007/01/01},3,300,30) INSERT INTO testsub VALUES ({^2007/01/02},4,200,40) INSERT INTO testsub VALUES ({^2007/01/02},5,400,50) INSERT INTO testsub VALUES ({^2007/01/02},6,300,60) INSERT INTO testsub VALUES ({^2007/01/03},1,100,70)By the following method all data goes to Excel properly.
select testsub copy to 'C:\Xls\'+alltrim("Date Wise")+".xls" type xl5 release all like lo* loexcel = createobject("Excel.Application") loworkbook = loexcel.workbooks.open('C:\Xls\'+alltrim("Date Wise")+".xls") losheet = loworkbook.sheets(1) && or pass the name of your sheet as a string! loexcel.visible = .t. && display ExcelNow In Excel Sheet, I want to get Sub Totals as