>Hi all:
>
>I am looking for a way to take data from multiple tables and put them into 1 Excel worksheet and totaling each table
You can execute a SQL query to collect a data and use OLE automation to move data into Excel worksheet, add totals and format cells. The KB article Q247412 discusses methods for transferring data from Visual Basic, but you can do the same in VFP.
To move data using clipboard you can copy records into clipboard using _VFP.DataToClip() method. For Excel 2000 and higher you can move data using ADO recordset and CopyFromRecordset Excel command. For this way there is a Dbc2Xls sample in file #
10002.
Alexander