>I can't use a table and save to excel because there are too many columns and the nature of the data would make it difficult to build several tables and link them together. I am using the with clause extensively but it is the oXLWorkSheet.cells(x,y).value='...' that seems to eat the time.
Then you will have to create a file that excel can read in such as coma delimited. This is unfortunate because of the time it will take to create the file, but overall will be quicker than writing the data one cell at a time.
Here's the sample code to use the clipboard to cut and paste
*data to excel using cut & paste
_VFP.DataToClip(,,3) &&To read data from table
*In your case you will have to build the data and put into clipboard using
*_CLIPTEXT. Seperate columns with tabs and rows with CR's.
_CLIPTEXT ="HELLO"+chr(9)+"THERE"+chr(13)+"ROW 2"+chr(9)+"DATA"
oExcel = Create("Excel.Application")
oExcel.Workbooks.Add()
oRange = oExcel.Range("A1:B2")
oRange.PasteSpecial()
oExcel.Visible = .T.
Michael McLain