I need to send my DBFs to Excel spredasheet with full functionality. I use the same procedure. All but one work fine. This particular procedure sends 17000 records to Spreadsheet with 12 columns.
loExcel=CREATEOBJECT("Excel.Application"
WITH loExcel
.Workbooks.ADD
.RANGE("A1"
.VALUE="Date:"
..........................
.RANGE("L1"
.VALUE="...."
lnRow=2
SELECT TEMPRPT
SCAN
.Cells(lnRow,1).VALUE=TEMPRPT.Field1
....................................
.Cells(lnRow,12).VALUE=TEMPRPT.Field12
lnRow=lnRow+1
ENDSCAN
ENDWITH
loExcel.ActiveWorkbook.SaveAs(cName)
loExcel.ActiveWorkbook.Close
loExcel.Application.Quit
RELEASE loExcel
After executing of this procedure my XLS file is Ok, but EXCEL still open.
What's wrong?
loExcel=CREATEOBJECT("Excel.Application"
WITH loExcel
.Workbooks.ADD
.RANGE("A1"
..........................
.RANGE("L1"
lnRow=2
SELECT TEMPRPT
SCAN
.Cells(lnRow,1).VALUE=TEMPRPT.Field1
....................................
.Cells(lnRow,12).VALUE=TEMPRPT.Field12
lnRow=lnRow+1
ENDSCAN
ENDWITH
loExcel.ActiveWorkbook.SaveAs(cName)
loExcel.ActiveWorkbook.Close
loExcel.Application.Quit
RELEASE loExcel
After executing of this procedure my XLS file is Ok, but EXCEL still open.
What's wrong?