Information générale
Catégorie:
COM/DCOM et OLE Automation
>>Do you have a quick way of transferring lots of data from VFP into Word tables? I have tried a cell by cell approach but it takes an unacceptable amount of time. I need a generic routine that does not require knowing the table layout, and allows any ordinary data type. Delimited files don't work either, as VFP adds quotation marks around character data and Word does not strip them out. Can XML be used in any way?
>
>Try writing the data out to a text file with:
>
>COPY TO TYPE DELIMITED WITH " " WITH CHARACTER " "
>
>I just tested and that works in VFP 7, giving a file with the data lined up and no commas or quotes. If that doesn't work, try some variations.
>
>Once you get the data into Word, you can convert text to table.
>
>Tamar
Tamar,
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.
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.
Thanks,
Isabel
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement