Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quick Transfer of Losts of VFP Data to Word Table?
Message
De
12/10/2001 21:26:06
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
12/10/2001 17:45:04
Isabel Cabanne
Hubbard Woods Software, Inc.
Winnetka, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00567281
Message ID:
00568076
Vues:
24
>I started working with COPY TO, and the issue of getting data in with no character field delimiters (even spaces won't work for me), but soon realized I have a bigger issue. In many reports, I embed returns in the strings to format the data within an individual cell. For example: a formatted address designed for use in a mail merge. You can imaging the havoc that Word's Text to Table conversion works on that data.

You can convert CRs into "^R" or whatever is word's internal denoting a CR, using StrTran(), before copying out.

>I am going to try passing the data through HTML. I wonder, however: can I push a table onto the clipboard and paste it in somehow? Or, perhaps there's a row by row approach that's faster than a cell by cell population of the table.
>
>In any event, I need a VFP 6 resolution for the time being.

Another approach: select the data you need into a cursor. Then get all of it onto the clipboard:
_vfp.datatoclip(,,3)
Then paste it in Word. This gives you a tab-delimited set of values, with cr/lf between records, which Word can automatically convert into a table. As far as conversion of CRs goes, I figure ^R would confuse Word, but it can be manipulated once you have a table - a search/replace within Word can do that. Just use something like "%%" instead.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform