clear Clear All * Create a test cursor Create Cursor testcursor (Rcno i,cType c(10), nType i, dType d) Rand(-1) For ix = 1 To 200000 && Create 200000 recs cursor Insert Into testcursor Values ; (Recco()+1,Sys(2015), Int(Rand()*1000), Date()-Int(Rand()*100)) Endfor lcHeader = Chrtran('Rcno,cType,nType,dType',',',Chr(9))+Chr(13)+Chr(10) #Define xlDelimited 1 Set Sysformats On Set Safety Off lnTotal = Reccount() locate Wait Window Nowait "Pls wait sending data to Excel..." Start = Seconds() oExcel = Createobject("Excel.application") With oExcel .workbooks.Add && Add a new workbook lnMaxRows = .ActiveWorkBook.ActiveSheet.Rows.Count && Get max row count lnNeededSheets = Ceiling( lnTotal / (lnMaxRows - 1) ) && 1 row header ? "Total Pages : "+Padr(lnNeededSheets,3," ") .Visible = .T. With .ActiveWorkBook lnCurrentSheetCount = .sheets.Count If lnNeededSheets > lnCurrentSheetCount .sheets.Add(,.sheets(lnCurrentSheetCount),; lnNeededSheets - lnCurrentSheetCount) && Add new sheets after old ones Endif For ix = 1 To m.lnNeededSheets With .sheets.Item(ix) .Name = "Page "+Padl(ix,3,"0") .Activate lcTempFile = Sys(2015)+".txt" Copy Next m.lnMaxRows-1 To (m.lcTempFile) Delimited With Tab _Cliptext = m.lcHeader + Filetostr(m.lcTempFile) Erase (lcTempFile) .Range("A1").PasteSpecial() IF !EOF() SKIP endif ? "Page no : "+; padl(m.ix,3)+; "/"+; padr(m.lnNeededSheets,3)+ ; " Elapsed : ",Seconds() - Start Endwith Endfor .sheets.Item(1).Activate Endwith Endwith ? "Total Elapsed : ",Seconds() - StartI would however suggest using VFP2Excel function.