>Thanks, ok than how can write a store procedure that would copy the data from sql table into given excel file?
You can use Data Transformation Services (DTS) to export to Excel. You can run DTS package from VFP
HOWTO: Execute a SQL Server 7.0 DTS Package from Visual FoxPro mskb #
247356.
--sb--