Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble with Memo fields and Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00701328
Message ID:
00701370
Views:
15
This message has been marked as the solution to the initial question of the thread.
>Hi Friends!
>
>I´m having a little trouble exporting data from a memo field to Excel. everything works fine with this code:
>
>
WITH .RANGE("B4")
>	.VALUE = dgeneral.gpoliticos
>	.HorizontalAlignment = xlLeft
>	.WrapText = True
>ENDWITH
>
>But once the data are on cell, appear some square sign that means the intro keys. Something like this:
>
>
Hello
>World,
>what´s new? I think it´s a incredible
>site to ask about VFP!
>
>Is there a way to correct it?
>
>Thanks in advance!

Try:

.VALUE = chrtran(dgeneral.gpoliticos,chr(13),"")
or
.VALUE = chrtran(dgeneral.gpoliticos,chr(13)+chr(10),"")
or
.VALUE = strtran(dgeneral.gpoliticos,chr(13),chr(13)+chr(10))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform