My initial problem was to create a Multi-sheet Excel workbook from VFP sources as part of an automated procedure.
This ruled out using the COPY TO and EXPORT methods, as they create new workbooks.
So I went with Excel Automation, using the _VFP.DataToClip(,,3) command to copy my currently selected table in to the Windows clipboard, and then have Excel Paste into cell A1. This is done in a loop for each of the Sheets in the workbook.
Which works fine, for the most part.
However, some users running the report ran into problems which (to me) pointed to the _VFP.DataToClip() command NOT populating the clipboard; nothing is being pasted to Excel, and when I ctrl-V / shift-insert in another application, the clipboard is empty. We are all using VFP9 and in all cases, there is only 1 data session (the default).
Anybody else seen this problem, or have a workaround ?
This ruled out using the COPY TO and EXPORT methods, as they create new workbooks.
So I went with Excel Automation, using the _VFP.DataToClip(,,3) command to copy my currently selected table in to the Windows clipboard, and then have Excel Paste into cell A1. This is done in a loop for each of the Sheets in the workbook.
Which works fine, for the most part.
However, some users running the report ran into problems which (to me) pointed to the _VFP.DataToClip() command NOT populating the clipboard; nothing is being pasted to Excel, and when I ctrl-V / shift-insert in another application, the clipboard is empty. We are all using VFP9 and in all cases, there is only 1 data session (the default).
Anybody else seen this problem, or have a workaround ?