>>*** Stored procedure >>function createexcel >> lparameters lcSQL && for later >> *execscript(lcSQL) && for later >> filespec = (justpath(dbf())+ "../output/sampleout") >> select * from sites into table (filespec) >> use (filespec) >> filespec = (justpath(dbf())+ "../output/sampleout2") >> copy to (filespec) type xl5 >> return filespec >>endfunc >>