>...
>I've done this and now in each cell, the data is '2E63 but displays as 2E63. I'll have to contact the end user of the spreadsheet and see if this is acceptable.
>
>The ideal solution would be a NumberFormat of 'Text' similar to the 'General' option. I'll see if I can play around with this more. I'll let you know if this works. :)
There is a separate "Text" format in Excel. You would probably have to set this first, and then insert the value. Using the macro editor in Excel, and applying this format, gives me:
Selection.NumberFormat = "@"
Adapting this to VFP would produce a command similar to the following:
oSheet.Cells(lnRow, lnCol).NumberFormat = "@"
oSheet.Cells(lnRow, lnCol).Value = "2E63"
See if this works; I don't have VFP at hand right now.
>
>By the way, this is Office 97 and VFP6sp5 otherwise I'd press for getting something like xfrx and just printing the report to an .XLS file.
Automation should be almost identical in Office 97 and 2000, as well as later versions, AFAIK.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)