User’s Guide : Extending EViews : Object Linking and Embedding (OLE) : Using OLE
  
Using OLE
 
Pasting Graphs
Paste > As Picture (Enhanced Metafile)
Paste > As EViews Object
Paste Link > As EViews Object
Linked Graphs and the Graph Slider Bar
Pasting Tables and Spreadsheets
Pasting Formatted Information
Paste > As Picture (Enhanced Metafile)
Paste > As EViews Object
Paste > As Formatted Text (RTF)
Paste > As Unformatted Text
Paste Link > As EViews Object
Paste Link > As Formatted Text (RTF)
Paste Link > As Unformatted Text
Pasting Numerical Data
Paste > As Picture (Enhanced Metafile)
Paste > As EViews Object
Paste > As Text and Paste > As Unicode Text
Paste Link > As Picture (Enhanced Metafile)
Paste Link > As EViews Object
Paste Link > As Text and Paste Link > As Unicode Text
Pasting Links and the Workfile Sample
Error when pasting links into Excel
Modifying the Excel Array Formula
Extending the Excel Cell Range
Copy Special for Spreadsheets
To use OLE, simply copy the contents of an EViews object window to the clipboard in the usual fashion, then paste the clipboard contents to the destination in another application using one of application supported OLE paste methods.
In the discussion to follow, we assume that you have already copied the EViews object information, and we describe how to paste into Microsoft Word, Excel, and PowerPoint. While the basics of the operations will be the same for most applications, there may be subtle differences for other applications (and versions of these applications).
The simplest approach is to select Edit/Paste or CTRL-V to perform paste the clipboard contents using the default program settings. In Microsoft Word or PowerPoint 2007, the default paste puts an embedded image in the destination document. Different applications will handle the default paste differently; some will simply paste a static picture of the content. (You can tell whether the paste uses OLE by double-clicking on the object in the target application. If the application launches EViews, the pasted image is not a static picture or static text.)
Since the default paste behavior varies by application, we recommend that you select Edit/Paste Special... from the main (or right-mouse button menu) to paste into the destination, as this will offer control over the output type. The destination application will determine which OLE paste options are available, but generally speaking, you will be offered a choice between three paste methods:
The object may be pasted as a static picture or static text.
The object can be pasted as an embedded EViews object.
The object may be pasted as a linked text or image.
As discussed in “Embedding vs. Linking”, the preferred choice between these options depends on the types of modifications you anticipate performing in the future. If the object will not require additional modification, you can paste as a picture or text. If the object will only require cosmetic upgrading, you may paste as an embedded object. If the object requires full updating and access to the original workfile data, you should paste as a linked object.
In the following sections, we will describe in greater detail the behavior of selected Paste Special operations for copying graphs, tables, and spreadsheets into Microsoft Word, Excel, or PowerPoint. Our examples are constructed using Microsoft Office 2007.
Pasting Graphs
The methods for pasting EViews graphs into Word, Excel, and PowerPoint are very similar. We will illustrate the options and menus offered by Word for pasting a graph.
We begin by copying the graph in EViews. Simply display the EViews graph view, type CTRL-C, or right-click and select Copy to clipboard... to place the graph on the clipboard.
Now switch to Microsoft Word. To paste the graph, click the down arrow below the Paste icon in the top-left corner of the toolbar and select Paste Special... from the menu:
Microsoft Word will prompt you for additional options in a Paste Special dialog. Most importantly, you will be prompted to choose between the Paste (embedding or simple copy-and-paste) or Paste link (linking) options.
Here we see the dialog when you select Paste, with a listbox offering you the choice of pasting as an EViews Object (embedding) or as a Picture (Enhanced Metafile) (simple copy-and-paste):
Note that since we have selected Paste as our method, choosing EViews Object means that we are embedding the object in the Word document.
Alternately, if you choose Paste link, the dialog offers only the choice of pasting (linking) the EViews Object:
Note that since we have selected Paste link as our method, choosing EViews Object means that we are providing a link to the object in the Word document.
We discuss each of the three methods in turn.
Paste > As Picture (Enhanced Metafile)
To paste a graph as a static image, select Paste Special... in the main Microsoft Word menu, click on the Paste radio button, select Picture (Enhanced Metafile) from the listbox, and click on OK. A metafile will be inserted into your Word document. The pasted output is simply an image, which can be resized and edited only using the tools provided by Microsoft Word.
Paste > As EViews Object
To embed an EViews graph into your Word document, select Paste Special... in the main Microsoft Word menu, click on the Paste radio button, choose EViews Object from the listbox, and click on OK.
Note that since we have selected Paste as our method, choosing EViews Object means that we are embedding the object in the Word document. Your embedded graph will not change unless you double-click it and make modifications within EViews. Since it is disconnected from the original workfile and graph from which it was copied, it remains editable even if the source objects have been deleted.
The resulting pasted object initially appears very similar to the metafile. However, embedding a graph into Word produces an object similar to a frozen EViews graph. You may double-click on the graph inside the Word document to open the graph in EViews. If EViews is already open, the graph will open within the current instance. Otherwise, a new copy of EViews will be opened.
The embedded graph will open in a new graph window within EViews, with the title “EMBEDDED01”. (As additional embedded graphs are opened at the same time, they will be titled “EMBEDDED02”, “EMBEDDED03”, etc.) Notice how the title implies that this is a temporary graph window within EViews. It is a copy of what now was embedded in Word, and is fully independent from the original graph.
From here, you can modify the graph attributes. You can set color and axis settings for the graph, turn on grid lines, change the legend text, and even sort the series.
When your edits are complete, you may update the embedded graph in the Word document by clicking the Push button on the EViews graph window. Alternately, you may simply close the graph window in EViews, and you will be prompted to push the changes to the embedded graph in Word.
Note that if you push the changes, your edits are saved in the embedded graph in Word. If the original object in EViews from which the copy was made exists, it remains unchanged. This is a key difference between embedded and linked objects.
Paste Link > As EViews Object
The most powerful feature of OLE is its ability to link pasted objects to their source in EViews. To paste a graph object into Word that will remain linked to EViews, select Paste Special... in the main Microsoft Word menu, choose the Paste link radio button on the left of the dialog, select EViews Object from the listbox on the right, and click OK. Note that your EViews object and workfile must both be named before the object may be pasted as a link. (You are simply pasting a reference back to the EViews object, and EViews must be able to identify the object from which to draw the information.)
Again, the graph appears identical to one pasted using other methods. However, double-clicking on the graph brings up the actual series or graph within EViews. You may note that the title of the window is not “EMBEDDED01”, as it was in the embedded case, but is the name of the EViews object in the workfile. This is not a copy of the graph; it is the actual series view or graph in EViews.
Any changes to the data, sample, or graph attributes that you make within EViews will be passed to the graph link in Word. Updates in OLE linked graphs in Word generally occur as the EViews graph is updated, but you may force an update by pressing the Push button at the top of the EViews graph window. Alternately, you may right-click on the graph in Word and select Update Link.
One fundamental difference between embedded and linked graphs is that to edit an embedded graph, you must double-click on the embedded graph to launch EViews. In contrast, a linked graph will update whenever the underlying information changes within EViews. If your Word document is closed and changes are made to the related data in EViews, the linked graph may be updated the next time the document is opened. (You will notice that when the linked Word document is closed, the Push button on your EViews graph is not shown since EViews cannot actively update your linked graph until it is reopened.)
It is important to note that linked objects can become “orphaned” if the original EViews workfile is deleted or moved, or the original object is deleted or renamed. If Word and EViews are both open and a linked object is renamed within EViews, Word will generally recognize this and the link will remain intact. However, if the Word document is closed at the time an object is renamed, Word will no longer know how to locate the object in EViews, and the linked object will become orphaned. You will be prompted the next time the document is opened that it cannot locate the source information. (You may, at any time, confirm the validity of your link target by double-clicking the linked graph to open the corresponding graph within EViews.)
Note that a single EViews graph can be pasted as a link in multiple documents, across various applications. This means you may include your results in both a Word document and a PowerPoint presentation, and that both linked objects will update as EViews changes.
Linked Graphs and the Graph Slider Bar
There is one subtle issue that you should keep in mind when linking graphs where you have modified the display using the sample bar.
Many EViews graph views allow you to adjust their local sample by dragging the slider bar at the bottom of the graph window. Crucially, the persistence of this view sample change depends on the type of graph you are modifying.
Recall that there are two types of graphs in EViews: a graph view and a graph object. A graph view is made by showing a graph view within a series or group object. A graph object is created by freezing a graph view of a series or group. Thus, a graph object is a frozen graph view.
When you change the sample of a graph view of a series or group object using the slider bar, the slider sample change is transitory; the sample for the view will be reset to the workfile sample when the series window is closed. In contrast, a slider modified view sample is preserved in a graph object, even after the object window is closed. This difference in persistence is relevant for link behavior since it may lead to your series or group object graph view and your linked graph to use different samples.
Let’s see how the slider bar may affect linked graphs. Suppose you have created a graph object GRAPH01 by freezing a graph view of the series X. You re-adjust the sample of GRAPH01 using the slider bar, and then copy-and-paste the graph as a link into a Word document. If you return to EViews and adjust the sample of GRAPH01, the new sample will be stored within GRAPH01 and the linked graph’s sample will follow.
Alternately, suppose you modify the graph view of series X by setting the slider bar to show a subset of observations. When you copy-and-paste the graph view as a link, EViews stores the current view sample as part of the link, however, since you are working with a series object and not a graph, EViews treat the slider modification as a temporary change which will be discarded when the series window is closed. When you reopen the series window, the graph view will use the workfile sample while the linked graph will use the slider sample at the time the graph was linked.
If you wish to reset the sample in the linked graph to match that of the EViews graph view, you may do so by dragging the slider bar in the series window. In fact, anytime the slider bar is used, the linked graph will adjust accordingly. Alternately, to edit or view the linked graph in EViews while preserving the sample, double-click the linked graph. This brings up the graph view of the series, with its sample set to match that of the linked graph.
Note however, that the series slider view sample will again be discarded when the window is closed so that the next time you open the series window, the samples will again be misaligned. Given the potential for confusion, we recommend that you freeze the view into a graph object and then link the graph object If you wish to use the slider sample.
Pasting Tables and Spreadsheets
The procedure for pasting EViews tables and spreadsheets into Microsoft Word, Excel, and PowerPoint is closely related to the method for graphs, described above in “Pasting Graphs”. There are, however, some unique options for pasting text and numerical values, which we focus on as we explore copy-and-paste from EViews spreadsheets and tables into other applications.
Generally speaking, EViews table and spreadsheet views used to hold two types of data: formatted information or output, and numerical data. For instance, output from an equation estimation is formatted and displayed in a table, while series spreadsheets are used to view the data contained in a series.
The type of information you are copying and what you wish to do with the copy will determine which paste method will best suit your needs:
If the object contains formatted information and we would like to preserve this formatting, we should consider pasting as an EViews Object, Picture (Enhanced Metafile), or as Formatted Text (RTF).
If you are pasting numerical data and precision is important (even though the full extent of the values may not be visible), you will want to paste the object as pure text. Additionally, if you are pasting into Excel and would like to include the data in Excel formulae, you should paste as text.
The nature of the application into which you are pasting also provides clues as to the best paste method. Generally, if you are creating a document in Microsoft Word or Microsoft PowerPoint, you may prefer a formatted image or formatted text, while if you are pasting into Microsoft Excel, you will likely want numerical values.
When pasting into external applications, you will typically be presented with a subset of the following Paste Special... options:
Picture (Enhanced Metafile) (static)
EViews Object (embedded or link)
Formatted Text (RTF) or Unformatted Text (static or link)
Unicode Text or Text (static or link)
As you can see, some of the choices have multiple forms, embedded or link, or static or link.
Pasting Formatted Information
Let’s explore some of the available choices when pasting output that has been formatted by EViews. One of the more common operations involves pasting data from EViews into a Microsoft Word document in Rich Text Format (RTF). Pasting as RTF allows you to include formatted equation estimation output in your documents, such that the columns and sections created in your EViews table are recreated in the pasted object in Word.
(Our example uses Microsoft Word 2007. Your program and dialogs may vary.)
As with graphs, we must first copy the data from within EViews. When copying from a table or spreadsheet, you must choose your range of data and specify how you would like it copied. Highlight a range of text, or choose Select all from the right-click men to copy the entire spreadsheet. Then press CTRL-C or select Copy from the right-click menu.
A dialog will appear showing two methods for copying your data. If you select Formatted, the numbers will be copied using the display format of the table or spreadsheet. Alternately, if you select Unformatted, the numbers will be copied at the highest precision possible for your data. (Note that any NA’s in your data will be coded as “NA” if you select Formatted. Otherwise, they will appear as empty values.) Click on OK to place the data on the clipboard.
We emphasize that you do not have to copy an entire table or spreadsheet. You may select any range of cells, and copy just the selected cells. For instance, you may extract a single column from the estimation output of an equation, and paste it into Excel for presentation or numeric analysis.
You may perform a simple paste by switching to Microsoft Word and clicking the Paste button, selecting Paste from the right-click menu, or typing CTRL-V. The data will be pasted as static text using the format settings selected during copy.
Alternately, to take advantage of OLE capabilities in Microsoft Word, click the down arrow below the Paste icon in the top-left corner of the Word toolbar:
If you select Paste Special... from this menu, Word will display a dialog prompting you to specify a paste method. You should use the radio buttons on the left to choose between Paste (embedding or simple copy-and-paste) or Paste link (linking) the EViews object.
Here we see the dialog when you select the Paste radio button, with a listbox offering you the choice of pasting the EViews Object (embedded), Formatted Text (RTF) (static), Unformatted Text (static), or Picture (Enhanced Metafile) (static):
If instead you choose Paste link, the dialog offers you the choice of paste as a link of type EViews Object, Formatted Text (RTF), or Unformatted Text:
(Note that the Unicode Text and Text options are available when pasting into some applications, but not when pasting into Microsoft Word.)
Paste > As Picture (Enhanced Metafile)
To paste your text as a static image, select Paste Special... in the main Microsoft Word menu, click on the Paste radio button, select Picture (Enhanced Metafile) from the listbox, and click on OK.
A static metafile will be inserted into your Word document. Note that Even though you copied text from the table or spreadsheet, the pasted output is an image, which can be resized and edited only using the tools provided by Microsoft Word.
Paste > As EViews Object
To embed data from EViews into your Word document, select Paste Special... in the main Microsoft Word menu, click on the Paste radio button, choose EViews Object from the listbox, and click on OK.
Embedding the EViews object into Word allows you to double-click on the text inside the Word document to open the text for editing in a table object in EViews. If EViews is already open, the text will be opened within the current instance. Otherwise, a new copy of EViews will be launched.
The embedded text will open in a new table window within EViews entitled “EMBEDDED01”. (As additional embedded objects are opened at the same time, they will be titled “EMBEDDED02”, “EMBEDDED03”, etc.) This is a temporary table window within EViews used only for modifying the embedded object. It contains a copy of the embedded object view text in Word, but is fully independent from the original table or spreadsheet.
You may use EViews to modify the font and color of the text, the borders and outlines, or the data itself, as you would with any table object. You may also apply number formatting to the cells of your temporary table object.
When you are done editing the table, you may update the embedded object in the Word document by clicking on the Push button on the EViews table window. Alternately, you may simply close the table window in EViews, and you will be prompted to send your changes to Word. If the original table or spreadsheet in EViews from which the copy was made exists, it will be unchanged.
Paste > As Formatted Text (RTF)
Formatted EViews output such as equation output is most commonly pasted into Word as Formatted Text using Rich Text Format (RTF).
To paste a formatted table or spreadsheet from EViews into your Word document, select Paste Special... in the main Microsoft Word menu, click on the Paste radio button, choose Formatted Text (RTF) from the listbox, and click on OK.
(Note that the term “formatted” in the Word paste dialog refers to the overall settings of the object to be pasted, such as text size, fonts, column widths, and section specifications. This setting is unrelated of the use of the terms “formatted” or “unformatted” in the EViews copy dialog which refer to the format and precision of the numbers to be copied.)
Here, we have pasted EViews estimation output from an equation. You can see that the table sections, column widths, and formatting have been preserved.
Paste > As Unformatted Text
To paste unformatted table or spreadsheet data into your Word document, select Paste Special... in the main Microsoft Word menu, click on the Paste radio button, choose Unformatted Text from the listbox, and click on OK.
This paste method is pretty straightforward. The text is pasted without column or cell specifications, and without any other formatting EViews may have applied to the table. This can be useful if you have copied from a formatted table or spreadsheet in EViews, but you do not want to create a table in your Word document. Use this option to paste just the text itself.
Again, note that the use of the term “unformatted” in the paste dialog refers to table formatting. The choice you made in the EViews dialog to copy “formatted” or “unformatted” text pertains to the precision of the numbers, and it will be preserved regardless of your choice of paste method.
Paste Link > As EViews Object
To paste data into Word that will remain linked to EViews, select Paste Special... in the main Microsoft Word menu, choose the Paste link radio button on the left of the dialog, select EViews Object from the listbox on the right, and click OK. Bear in mind that your EViews workfile and object must be named before the object can be pasted as a link.
Once you have pasted table or spreadsheet data into Word as a link, you can double-click on the link in your document to bring up the actual object within EViews. You may note that the title of the window is not “EMBEDDED01”, as it was in the embedded case, but is the name of the EViews object in the workfile. This is not a copy of the table or spreadsheet; it is the actual object in EViews.
As with the embedded object, you may cosmetic edits to the table or spreadsheet, changing fonts, text size, etc. However, unlike embedding, linking allows you to make modifications to the actual object so that you may make substantive changes like changing numeric values in your tables or spreadsheets. Furthermore, since links are actively tied to the data in EViews, if you have copied the formatted version of your data, the precision of the numbers in a link will update if you modify the numerical formatting within EViews.
Generally, a linked object will update when the underlying data changes within EViews. You may force an update to a linked table or spreadsheet in an open Word document by pressing the Push button at the top of the EViews object window. Alternately, you may right-click on the linked object in Word and select Update Link. If your Word document is closed and the linked object can be updated the next time the document is opened.
As we mentioned for graphs, linked objects can become “orphaned” if the original EViews workfile is deleted or moved, or the original object is deleted or renamed. If Word and EViews are both open and a linked object is renamed within EViews, Word will generally recognize this and the link will remain intact. However, if the Word document is closed at the time an object is renamed, Word will no longer know how to locate the object in EViews, and the linked object will become orphaned. You will be prompted the next time the document is opened that it cannot locate the source information.
Note that a single EViews table or spreadsheet can be pasted as a link in multiple documents, across various applications. This flexibility means you may include your results in both a Word document and a PowerPoint presentation, and that both linked objects will update as the underlying EViews data changes.
Paste Link > As Formatted Text (RTF)
You may link formatted text by pasting as Formatted Text, or in Rich Text Format (RTF). Pasting as a link offers us the additional advantage that as the data are updated in EViews, it may also be updated in your Word document. Furthermore, if you have copied formatted data, the display precision of the numbers in a linked object will follow the formatting specified in EViews.
To paste a link to a table or spreadsheet from EViews into your Word document, select Paste Special... in the main Microsoft Word menu, click on the Paste link radio button, choose Formatted Text (RTF) from the listbox, and click on OK. Again, remember that your EViews workfile and object must be named before the object can be pasted as a link.
Here we have selected the output from an equation estimation in EViews, copied it in Formatted form, and pasted as linked Formatted Text (RTF) into a Word document.
Just as with any linked information, formatted text will be updated as new data arrive in EViews. To update the linked estimation results, click within the text in Word, right-click and select Update Link. Alternately, press the Push button at the top of the EViews equation window. New results will be displayed in your Word document without having to re-copy and re-paste the data from EViews.
To open the link in EViews, double click on the object, or click on the object and select Linked EViews Object and Open Link from the right-click menu.
Paste Link > As Unformatted Text
To paste an unformatted table or spreadsheet link into your Word document, select Paste Special... in the main Microsoft Word menu, click on the Paste link radio button, choose Unformatted Text from the listbox, and click on OK. We reiterate, your EViews workfile and object must be named before pasting a link.
Just as for a non-link paste of unformatted text, the table or spreadsheet will be pasted without column or cell specifications, and without any other formatting that EViews may have applied to the object. You may want to use this method if you’d like to paste a link to the pure text, without creating a table in your Word document.
Pasting Numerical Data
When pasting table or spreadsheet results from EViews into another application for numerical analysis, you are likely to be concerned with the underlying numeric values of your data independent of their current display format.
In this section, we will illustrate how to paste spreadsheet data into Microsoft Excel, as this is the most common target application for pasting numerical data. We employ Excel 2007 in our examples; your dialogs may differ for alternate applications.
Just as with other paste methods, we must first copy the data from within EViews. When copying a spreadsheet, you must choose the range of data and the format in which to copy numeric data. To select a range of cells to copy, simply highlight them in the spreadsheet. To copy the entire spreadsheet, choose Select all from the right-click menu. Then press CTRL-C or select Copy from the right-click menu.
A dialog will appear showing two methods for copying your data. If you select Formatted, the numbers will be copied using the display format currently showing in the spreadsheet or table view. You may, for example, have specified fixed format showing two decimal places. Formatted copying will only capture these two decimal places of precision. Alternately, if you select Unformatted, the numbers will be copied at the highest precision for your data. Any NA’s in your data will be coded as “NA” if you select Formatted. Otherwise, they will appear as empty values.
Additionally, if you are copying cells from a spreadsheet, you may choose to Include header information. This will also copy the column and row labels for the selected range of cells. Generally, these are the observation numbers and possibly the series names, if you are copying from a group. Click OK to place the spreadsheet data on the clipboard.
Remember that you do not have to copy the entire table or spreadsheet. You may select any range of cells, and paste them as an embedded or linked object. Note that when you copy a portion of the data from a series or group spreadsheet, the workfile sample becomes relevant. See “Pasting Links and the Workfile Sample” for a discussion of how samples are managed in linked data.
Once copied, you can import the information into your document by switching to the application and clicking the Paste button, selecting Paste from the right-click menu, or by typing CTRL-V. This will paste the data using the default method using the format settings selected during copy.
Alternately, you may use wish to have better control of the paste method. Click the down arrow below the Paste icon in the top-left corner of the Microsoft Excel toolbar. You may select Paste Special... from the menu to bring up the main dialog, or you can choose one of the shortcut items shown directly on the Paste menu (if visible).
If you select Paste Special... from the Paste menu or from the right-click menu you will see a dialog very similar to the one we saw when pasting graphs and formatted text. You should use the radio buttons on the left to choose between Paste (embedding or simple copy-and-paste) or Paste link (linking) the EViews object.
Here we see the dialog when you select the Paste radio button, with a listbox offering you the choice of pasting the EViews Object (embedded), Picture (Enhanced Metafile) (static), Unicode Text (static), or Text (static):
Alternately, if you choose Paste link, the dialog offers you the choice to paste as a link of the same types, EViews Object, Picture (Enhanced Metafile), Unicode Text, or Text:
(Note that the Formatted Text (RTF) and Unformatted Text options are not presented when pasting into Microsoft Excel. In addition EViews does not allow links on some statistical views that require more information than can be described by a link formula. See “Modifying the Excel Array Formula”.)
Since we intend to treat our data as numbers in Excel, we would like to view each cell as a numeric value that can be manipulated using formulae. In this setting, the Paste Special options which import data an image or a single block of data do not meet our needs. While we describe all of the choices below, you will probably most often use the options Paste As Text or Paste As Link Text when linking to Excel.
The usual considerations will govern the appropriate choice when linking into PowerPoint or Word.
Paste > As Picture (Enhanced Metafile)
To paste data as a static image, select Paste Special... in the main Microsoft Excel menu, click on the Paste radio button, choose Picture (Enhanced Metafile) from the listbox, and click on OK.
A metafile will be inserted into your Excel document. The static image can only be resized and edited using the tools within Excel. It is not connected to EViews in any way.
You may notice that the resulting image is not well formatted within Excel. The cells in the data do not correspond to Excel cells, and since we copied the numbers at full precision, the decimal points are not aligned. As a picture, the results can be stretched, resized, and rotated to any angle. Accordingly, we don’t imagine you will use this paste option for Excel very often. However, if you are pasting into Microsoft PowerPoint or Word, this may be a good way to get a static image of your data into your document.
Paste > As EViews Object
To embed numeric data from an EViews spreadsheet into your Excel document, select Paste Special... in the main Microsoft Excel menu and the Paste radio button on the left-hand side of the dialog. Select EViews Object from the listbox and click OK.
The embedded data looks very similar to the picture we pasted in the previous section. However, unlike the picture, this embedded object is similar to a frozen table and can be edited within EViews, notably to modify the formatting of the contents.
To open the table in EViews, double-click on the object within Excel. If EViews is already open, the table will open within the current instance. Otherwise, a new copy of EViews will be opened.
The embedded object opens in a new table window within EViews, with the title “EMBEDDED01”. (As additional embedded tables are opened at the same time, they will be titled “EMBEDDED02”, “EMBEDDED03”, etc.) The title reflects that this is a temporary table window within EViews. It is simply an image of what now exists in Excel, and will not be affected if the source workfile or data are moved or deleted.
We may use standard EViews tools to modify the formatting of the cells in the table object. From the EMBEDDED01 window in EViews, you can edit the data and push the results back into Excel by clicking the Push button on the EViews table window. Alternately, you may simply close the table window in EViews, and you will be prompted to send your changes to the embedded table in Excel.
Notice that your changes are saved in the table within Excel, but the original data in EViews remains unchanged.
Paste > As Text and Paste > As Unicode Text
If you wish to treat your pasted data as numerical values that can be placed into individual Excel cells and optionally be used in formulae, you will want to paste as text.
To paste as text, select Paste Special... in the main Microsoft Excel menu and click on the Paste radio button on the left-hand side of the resulting dialog. Select Unicode Text or Text from the listbox. You will want to select Unicode Text if your data contains a special character set, or will be read on a foreign language machine which may use a special set of characters. Click on the OK button to paste your data as text into your Excel file.
(Note that this static Paste As Text mimics the default Excel paste operation. You can perform this operation by selecting the Paste button or pressing CTRL-V. However, you should use Paste Special... to specify a paste of Unicode Text.)
Paste Link > As Picture (Enhanced Metafile)
If you wish to insert your table as a linked image, select Paste Special... in the main Microsoft Excel menu and choose the Paste link radio button on the left-hand side of the dialog. Select Picture (Enhanced Metafile) from the listbox and click OK. If the link option is grayed out in the dialog, remember that the EViews workfile and the object you copied from must be named before pasting as a link.
(If all you get is an empty object after using this paste method in Excel, see “Error when pasting links into Excel”.)
The resulting linked image may be resized and moved throughout the document, but its cells do not correspond to Excel cells. This is not the ideal paste method if you wish to treat your data as numbers which can be understood by Excel and optionally used in Excel formulae.
This approach does, however, still provide a link to the EViews data and the linked image will reflect changes in EViews upon update. If you are creating a Microsoft PowerPoint or Word document without cells or equations, this may be a good paste method.
As a side note, you may notice that Select All (CTRL-A) in Excel does not select these types of images. You need to select embedded images individually to perform operations such as move or delete.
Paste Link > As EViews Object
To paste your data as a linked EViews object, select Paste Special... in the main Microsoft Excel menu, click on the Paste link radio button, choose EViews Object from the listbox, and click on OK. If you do not see a link option in the dialog, remember that the EViews workfile and object you copied from must be named to paste as a link.
(If all you get is an empty object after using this paste method in Excel, see “Error when pasting links into Excel”.)
Pasting a table or spreadsheet link as an EViews Object behaves just like pasting a graph of this type. An image of the data is placed in your file, and you can double-click on the object to open the source in EViews. Edits will be passed back to the linked object upon update or by clicking the Push button in the EViews window. For detailed discussion, see the explanation for graphs, in “Paste Link > As EViews Object”.
Paste Link > As Text and Paste Link > As Unicode Text
The real power of OLE is seen when placing numerical data into Excel lies in linking text. When you paste data values into your document, and retain the connection to their source in EViews by pasting as a link, you take advantage of the true ease in updating your data. Not only are the values available to be used by Excel, they are self-updating and can incorporate all changes that occur within EViews. Accordingly, you can build formulae using the standard Excel syntax whose output will change based on updates to data and results obtained in EViews.
To paste your data as linked text, select Paste Special... in the main Microsoft Excel menu, click on the Paste link radio button, and choose Unicode Text or Text from the listbox. You will want to select Unicode Text if your data contains a special character set, or will be read on a foreign language machine which may use a special set of characters. Click on the OK button to paste linked data into your Excel file.
If the Paste link radio button is grayed out, remember that the EViews workfile and the object you copied from must be named before you can paste a link.
Just as with linked graphs, your linked data will update with changes to the values within EViews. You may force an update to the linked data by clicking the Push button on the EViews series or group window. Alternately, you may simply close the window in EViews to send your changes to the linked object in Excel.
It is important to recognize that linked objects are unidirectional. That is, they receive updates from EViews but are simply display containers within Excel.
The fundamental difference between working with linked graphs and linked text is that you do not double-click your table data within Excel to view it in EViews. Instead, select any cell in your linked table, go to the Data menu tab in Excel, and click Edit Links. (We have described the operation in Excel 2007; other versions may vary significantly.) A dialog appears, showing information for all links in your document. To open a link in EViews, select the link from the list and click the Open Source button on the right-hand side of the dialog.
To open the EViews source of linked text from Word, highlight a portion of the text, right-click to get a menu, and select Linked EViews Object, and then Open Link.
To see the source of your links in PowerPoint, select the text, right-click, and select Linked EViews Object and then Open from the menu.
Again, we have described the process in Office 2007, and your version may offer different menu options.
You may notice that when you have a cell selected within your linked text, Excel displays a string in the edit field at the top of the document. This is the array formula used to define the link, and is discussed in “Modifying the Excel Array Formula”.
Pasting Links and the Workfile Sample
The EViews workfile sample determines which series and group observations are included in a spreadsheet display. You may change the sample to look at different sections of your series and groups. When you copy-and-paste your data it as a link into another application, you would like the link to consistently point to the information that was copied, regardless of the sample settings inside EViews.
In nearly all cases, EViews smoothly handles the linking of spreadsheet data in the face of changing sample settings. We discuss the intuitive nature of how links and samples are managed, and we will point out one issue that occurs when you contract your workfile.
Recall that an EViews series or group spreadsheet has two approaches to displaying data with respect to the workfile sample. First, the spreadsheet may display values for every observation, whether the observation is included in the current workfile sample or not. Alternately, it can display only those observations which are included in the current sample. You may toggle between these two display modes by clicking the Smpl +/- button at the top of the EViews spreadsheet window.
When copying data, you should be mindful of the current workfile sample, as well as the sample of observations displayed in your spreadsheet. Crucially, when you copy cells in a spreadsheet, you are copying a range of cells in the current sample of observations in view. Both the range and the sample of observations in view at the time the data are copied are stored in the link. In this way, your link will remain connected to the proper values, regardless of sample changes within EViews.
Suppose, for example, that you have an annual workfile covering the years 1951 to 2000, and a series SER1. If you copy a spreadsheet display of all 50 observations in SER1 and paste as a link, the information stored with the link will indicate a range of 50 cells and a sample from 1951 to 2000. (This link information is called the array formula, and is described in: “Modifying the Excel Array Formula”.)
If you return to EViews and set the sample to include only the 25 observations from 1951 to 1975, your linked data are unchanged since the link still references the data for all 50 observations contained in the workfile range.
With the workfile sample change, you may now look at either the 25 observations in SER1 contained in the current sample, or all 50 observations in the workfile range, by toggling the Smpl +/- button. When you copy data from SER1, you should be mindful of which observations are being displayed. The link will behave properly when copied from either view, but the embedded range and sample are based on the current display, which will be based on either the workfile range or the workfile sample. (You can see the difference when looking at the array formula.)
EViews matches and updates the linked data seamlessly after sample changes, and this topic should not affect you unless you remove data within the cell range of the link sample. If you contract your workfile so that observations within the link sample are removed, the link cell range may lose the ability to reference the proper location of data within the workfile.
If, for example, you copied data for SER1 from 1960 to 1969, you were copying cells 10–19 from the spreadsheet display of the observations in the workfile sample or range. Then contracting the workfile by removing observations from 1951 to 1955 will lead to invalid linking. Alternately, removing observations from the 1991-2000 does not affect the validity of the link.
We urge you to recreate your links after workfile contraction, especially when data to be removed are not at the end of the workfile.
Error when pasting links into Excel
You may notice that sometimes when you paste into Excel, your object appears as an empty selection. Excel does not always handle the link paste operation correctly, particularly if you paste the same data as a link multiple times.
If this occurs, you should delete the link, recopy your data in EViews, and try the paste again. If you cannot clear the error in Excel, you should delete the link and restart Excel. Note that you must delete the item with the incorrect content; restarting Excel alone is not enough to clear the error.
Modifying the Excel Array Formula
When you click on a cell in Excel that is part of a linked table, you will see a formula in the edit field that provides Excel with the information it needs to link the object back to EViews. This expression is called the array formula. Embedded and linked objects may be visually distinguished by observing whether an array formula is present. Linked objects contain only this information, while embedded objects contain the actual graph or text.
Because links must be completely represented by this text string, we do not allow links on some statistical views that require more information than can be described by the array formula alone.
You may notice that Excel complains when you click in the array formula, and then try to click elsewhere in the document. This is because Excel is attempting to edit the formula by including information about the cell you clicked on. Simply hit escape (ESC) to exit the formula edit.
The array formula has up to three parts, which are separated by exclamation marks (‘!’). The expression begins with the full path name of the workfile. This is followed by the workfile page name (optional), the object name, and the object type (optional).
workfile_name!(page_name\)object_name(\object_type)!view=viewnum; range=[A1:B2];smpl=[obs1 obs2];…;
The last part of the formula provides information about the state of the object at the time it was copied. This may include the sample, the current view, and labeling or header options that were set in the spreadsheet when it was copied. Each option in this section is followed by a semicolon (‘;’).
Following is a list of options that EViews may code into the spreadsheet formula:
 
smpl=[obs1 obs2]
Sample specification for the data included in the link
view=n
 
EViews internal view number, indicating which view was active at the time of copy (spreadsheet view, graph view, etc.)
range=[A1:B2]
Range of spreadsheet cells included in the link
formatted
Specifies the copy precision: formatted or unformatted (set in the copy dialog)
mode=arg
Specifies the spreadsheet mode, where arg consists of a comma separates list of the following keys: no label (“nl”), compare (“c”), wide (“w”), transpose (“t”). Note that “w” is only for series spreadsheets.
headers
Indicates if the spreadsheet headers are visible in the link (set in the copy dialog)
sort=[x1, x2(, x3 ...)]
Stores the sort order of the series, where descending series are represented by a negative value
transform
Indicates if there was a data transform on the series at the time of copy
Since the options above are coded into the link when the spreadsheet is copied, they will be preserved in the link object, even when the underlying EViews object is modified. For instance, if a spreadsheet is in compare mode when it is copied, the link will reflect this setting, even if the mode of the original spreadsheet is changed.
While the full array formula can be tedious to specify from scratch, you can modify an existing link by changing a few key elements. In this manner, you may be able to redo a copy-and-paste operation by editing the array formula.
After editing the array formula, you must always hit CTRL-SHIFT-ENTER to complete your edits.
If you world like to link to a different series in your workfile, you may edit the object name parameter, found in the second section of the formula. For example, for a simple series link to a series X on page MYPAGE of a workfile named “data.WF1”, we have the array formula:
C:\data.wf1!mypage\X\series!view=0;range=[B2:H3];smpl=[1974 2011];
Notice that the range element in the formula indicates that we had selected the cell range “B2:H3” before copying the series. If you’d like to link to the same range in another series in your workfile, say series Y, simply change the “X” to a “Y”.
Another straightforward modification of an array formula would be to redefine the sample. In our example, the last item in the array formula specifies that the link uses a sample from 1974 to 2011. To change the sample in your linked series, simply modify these values.
Extending the Excel Cell Range
When you copy data from a spreadsheet view, the array formula will contain range information. If you would like to expand the range in your link you must extend the cell range within Excel along with making adjustments to the array formula.
For example, say you have data in your workfile for 2001 through 2010. You have selected the data for this range from one of your series and have pasted it as a link into Excel, into cells “A1:A10”. If you receive new data for 2011, you might expand your workfile and would like to include the new data in your link. However, when you pasted a link of ten cells, Excel created an object with a cell size of ten. You must instruct Excel to expand the link size to eleven cells.
To do this, select the larger range, where the newest cell will still be empty. In our case, we select “A1:A11”. Then modify the array formula such that the sample includes 2011 and the range reflects the additional cell in your EViews series. Hit CTRL-SHIFT-ENTER to complete your edits and to add a cell to the Excel link.
Note that you cannot shrink the range of cells in Excel. If your sample is shortened in EViews, the extra cells in Excel will be filled with zeros. To reset the range of cells, you must copy and paste the link into Excel again.
Copy Special for Spreadsheets
The preceding discussion offers a variety of choices for how you would like to select and paste your data. If you would simply like to copy an entire series or group and create a link in your spreadsheet, EViews provides the Copy Special shortcut. This method is useful when you are not concerned with selecting specific cells or the current object view.
Since Copy Special does not capture sample or view information, the operation should be done by copying the object directly from the workfile window. Right-click on a series or group and select Copy Special....
A dialog will appear offering you a choice to copy the object name or the object data. Copy object name will only copy the text of the series or group name. This method is useful if you are creating a list of object names. The more commonly useful choice is to select Copy object data. This copies the data within the object, filling the clipboard with information you can then paste as a link into your spreadsheet. In this manner, you may copy object’s data without having to open a spreadsheet view and select a range of cells.
You can avoid the dialog by typing CTRL-C or CTRL-SHIFT-C, with the object selected in the workfile window.
(Note that Copy Special (CTRL-SHIFT-C) only works with a single series or group. However, there is a method by which you can create links to multiple series with a single Copy Special operation. This involves editing the array formula, as described in “Modifying the Excel Array Formula”.)
Suppose you have a workfile with the three series X, Y, and Z, to which you’d like to create links. You could create a group containing the series and do a Copy Special on the group. This operation allows you to paste a link of the data with a single Copy Special and Paste Special operation.
However, you might prefer not to create a group or you might like each series to be its own link so the links can be placed throughout your spreadsheet instead of as one link object.
To accomplish this goal, first select any one of your desired series, do a Copy Special, then paste as a text link into your spreadsheet (Paste Special, Paste link as: Text). When you click within the linked data, you will see the link information in the array formula at the top of the Excel document. You will notice that the name of the series you just pasted can be found toward the end of this text string. In our case, you would see an ‘X’.
To create another link, you will copy the text of the array formula and paste it into the appropriate cells. This is a simple operation, however it must be done precisely, as Excel is very specific about what is required to interpret array formulas.
First, click anywhere within the data of the first series to show the array formula in the edit field at the top of the document. Select and copy the formula text (CTRL-C), then hit escape (ESC).
Move to the desired location for your next series, and select the appropriate range of cells. Paste the array formula into the edit field at the top, edit it such that it contains the proper series name, and click CTRL-SHIFT-ENTER. It is very important that you do not simply exit the edit field, but that you click CTRL-SHIFT-ENTER so Excel receives your edits. In our case, we would change the ‘X’ to ‘Y’. The second series is now fully linked, and data from EViews should appear in the cells you selected.
You may copy the array formula throughout your document in this manner, replicating your series links without needing to do multiple copy-pastes.
Note that if you use this method to create links for objects of different sizes (i.e., use what was originally a series link to create a group link), you must be particularly careful to select the appropriate number and configuration of cells for the target object before pasting the array formula.