Jerry,
Open Excel. Start recording a macro. Select the data, copy, save as, or whatever you want to do. Stop the macro. Open the VB editor and see what the macro says.
You can take this code almost as-is into FoxPro.
oExcel = CREATEOBJECT([Excel.Application])
oExcel.Visible = .T.
WITH oExcel
.Workbooks.Add
.ActiveWorkbook.Sheets(1).Activate
....
.ActiveWorkbook.SaveAs((lcSaveFileName))
.Quit
ENDWITH
One gotcha: when you're testing and you crash, release the objects or you'll very quickly get 10 copies of Excel and run out of memory.
I've had a lot of fun "driving" Excel this way.
>I've been given about 100 Excel 97 spreadsheets, and would like to extract the data from a particular named range (XDATA) that exists within each spreadsheet, and consolidate it into a single VFP database. I'm sure there's a way to consolidate the data using VBA, but I'm not familiar enough with that product to know where to start. There doesn't appear to be a native way to this in VFP. However, I wonder if anyone knows a way (perhaps using OLE) to do this. Thanks!!