PRB: Paste Option Disabled when Clipboard Holds Excel RangeLast reviewed: January 10, 1997Article ID: Q156236 |
The information in this article applies to:
SYMPTOMSThe general field of a Visual FoxPro table holds an object such as a Word document or an Excel worksheet. This kind of object may be embedded in or linked to a general field by programming or manually by copying the object to the Clipboard, then pasting it into the general field. You may want to save to a general field only a portion of an Excel worksheet--for example, a range of cells without all of the other data from that worksheet. After you select the range and copy it to the Clipboard, if Excel is still open, OLE with Excel embeds the entire Excel worksheet when you use the Paste or Paste Special menu options to embed or link into the general field of a Visual FoxPro table. You must close Excel in order to use just the range of cells on the Clipboard. However, when the Clipboard contains the data of a range of cells of an Excel worksheet and Excel is closed, the Paste and Paste Special bars of the Visual FoxPro Edit menu are disabled.
CAUSEWhen the Clipboard contains the data within a range of cells of an Excel worksheet, that data is not an object but, rather, is text. Because it is not an object, the Paste and Paste Special bars of the Edit menu are not enabled.
WORKAROUNDInsert an blank worksheet into the general field, then paste the data from the Clipboard into that sheet.
STATUSThis behavior is by design.
MORE INFORMATIONThe Visual FoxPro general field is intended to hold OLE objects, either linked to the original object or embedded as a copy of the original object. Microsoft Excel does not copy the data from a range of cells as an object, but rather as text. On the other hand, Microsoft Word copies a text selection from a document into the Clipboard as a Word document. That is an object, and you can paste it into a Visual FoxPro general field.
Steps to Reproduce Behavior
|
KBCategory: kbinterop kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |