Here is the solution ,
*PS : excel-all.h (Excel header file) if you have not open your Excel, Alt+f11, f2 shows oject browser. then find excel constant (which is begin xl ).
Use memotable && your table name or cursor
=Table2ClipBoard()
#include "excel-all.h"
oExcel = createobject("Excel.Application"

With oExcel
.Workbooks.Add
.visible = .t.
With .ActiveWorkbook.ActiveSheet
.Paste
.Range('A1').CurrentRegion.Replace("PMARK",""+chr(10)+"",xlPart,xlByRows, .F.)
Endwith
With .Selection
.ColumnWidth = 50 && Increase width for memo
.HorizontalAlignment = xlGeneral
* .VerticalAlignment = xlTop
.WrapText = .T.
Endwith
Endwith
Function Table2ClipBoard
lcTempFileName = "X"+sys(2015)+".tmp"
handle = fcreate(lcTempFileName) && Create a temp file
#Define TABULATE chr(9)
#Define NL chr(13)
For ix = 1 to fcount()
=fwrite(handle, field(ix))
If ix < fcount()
=fwrite(handle, TABULATE)
Endif
Endfor
=fwrite(handle, NL)
Scan && Start scan..endscan
For ix = 1 to fcount() && Write field values
=fwrite(handle, typeconvert(ix) )
If ix < fcount()
=fwrite(handle, TABULATE)
Endif
Endfor
=fwrite(handle, NL)
Endscan
lnSize=fseek(handle,0,2)
=fseek(handle,0,0)
_Cliptext = fread(handle, lnSize) && Read file to clipboard
=fclose(handle)
Erase (lcTempFileName)
Function typeconvert
Lparameters tnField
lcType = type(field(ix))
If lcType = "G"
lcField = field(ix)
* Return '' && VFP5 and 3
Return transform(&lcField) && VFP6 and up
Endif
luValue = eval(field(ix))
Do case
Case lcType = "D"
lcValue = dtoc(luValue)
Case lcType = "T"
lcValue = ttoc(luValue)
Case lcType $ "NY"
lcValue = padl(luValue,20," "

Case lcType = "L"
lcValue = iif(luValue,"Yes","No"

Case lcType $ "M" && Replace paragraph marks with "PMARK"
lcValue = strtran(luValue, chr(13)+chr(10), "PMARK"

Case lcType $ "C"
lcValue = luValue
Otherwise
lcValue = ""
Endcase
Return alltrim(lcValue)
Soykan OZCELIK
Comp.Prog / MSFoxPro Programmer Developer