AFAIK no way with COPY TO .. .XLS|5|8. You can do it with Excel Automation or by creating the cursor with with so many Char fields to contains the ammount of chars Largest Memo field:
i.e:
SELECT MAX(LEN(MemoField)) AS MLen FROM YourTable INTO ARRAY amLen
SELECT * FROM YourTable WHERE .f. INTO CURSOR crsTemp READWRITE
IF amLen[1] < 255
ALTER TABLE crsTemp DROP COLUMN MemoField
ALTER TABLE crsTemp ADD COLUMN MemoField C(254)
APPEND FROM YourTable
ELSE
APPEND FROM YourTable
FOR cLen = 1 TO CEILING(amLen[1]/254)
cfldAdd = "MemoFld_"+TRANSFORM(cLen)
ALTER TABLE crsTemp ADD COLUMN &cfldAdd C(254)
REPLACE ALL &cfldAdd WITH SUBSTR(MemoField,cLen*254-253,254)
NEXT
ALTER TABLE crsTemp DROP COLUMN MemoField
ENDIF
SELECT crsTemp
COPY TO ... XL5
(not tested)
>Hello all,
>
>I am currently working with a free table that contains, among others types, a memo field.
>
>A new requirement has been introduced whereas the client needs the contents of this table in Excel format. I have tried, without success, to copy to filenamex type xl5. Apparently, Excel and / or VFP have difficulty with memo fields during this transition.
>
>Short of creating another table of the same structure replacing the memo field with a character field (and running the risk of data loss)and then scatter memvar memo, insert into table2 from memvar, is there another method that I could use to achieve the desired result? Ultimately, how do I get Excel to recognize VFP memo fields?
>
>TIA
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.