never tried for sizes past int2, but you could do a quick test if _vfp.datatoclip(,,3) plus insert/ctrl-v in excel works with your data - perhaps you need to check for tabs in your data first. Automating the insert if ok should be a piece of cake ;-)
>We have an old system which exports a set of records to an XLS spreadsheet. Because of the record limitation in COPY XLS we export the table in chunks of 60,000 records. Currently, this means three separate spreadsheets are exported.
>
>The user has requested that only one file be generated.
>
>I did a COPY TO CSV. But that runs into issues because some of the fields have embedded double-quote characters in the value. For example, a description field that is
>width = 5" and height = 5.5" and color = "red"
>and the double-quote is breaking the intended format of the result.
>
>I could probably write something that opens an instance of Excel and then writes cell by cell, but that has a different set of issues.
>
>I can also go through the table and CHRTRAN the double-quotes into a pair of double-quotes. That seems to clear the immediate issue.
>
>Is there some other "COPY" or "EXPORT" command that I can use to get the desired result? Or some completely different process?
>
>All advice welcome.
>
>............Rich