

Step 2: Now go to your Word document and press Ctrl + V to paste the contents into the Word file. Step 1: Select the area in your Excel spreadsheet that you want to include in Word and then press Ctrl + C to copy the contents. In the second method, inserting an object, the entire spreadsheet will be placed into the Word file. Note that when using this method, you have the option to include only a part of the Excel spreadsheet in the Word document. Let’s start off with the first method, which is basically just copying and pasting from Excel into Word. In this article, I will show you how to do it using all three methods and explain what you need to do in order to create the link. In addition to inserting an existing Excel spreadsheet, you can also insert a new Excel object into Word, which basically runs Excel inside of Word itself. Note that EES can also communicate with EXCEL using Dynamic Data Exchange (DDE). Similar macro commands are available for communicating with WORD. EXCEL is never visible during the execution of the macro. Then, the entire contents of the Parametric table are copied back to EXCEL and saved with a different file name. EES then solves the table to calculate specific enthalpy, specific entropy and specific volume. The first two columns containing temperature and pressure information are copied from EXCEL to the EES Parametric table. The contents of this file are shown below.

When the macro is played, EXCEL file 'C:\EES32\Userlib\Examples\EXCEL_WS1.xlsx' is opened. The EES file also has a Parametric table with 10 rows and columns for variables T, P, h, s, and v. The Equations window for this file contains the following equations. This macro is run from EES file TestEXCELMacro.ees, located in the USERLIB\EXAMPLES directory in the EES folder. A listing of the macro file is as follows.ĮXCEL.OPEN('C:\EES32\Userlib\Examples\EXCEL_WS1.xlsx')Ĭopy ParametricTable 'Table 1' R1 C1 R10 C5ĮXCEL.FileSaveAs('C:\EES32\Userlib\Examples\EXCEL_WS2.xlsx') A simple example is provided in the EXCEL1.emf macro file, which is provided in the USERLIB\EXAMPLES directory in the EES folder. Macro files can be used to set up a communication between EES and EXCEL or WORD. Using a Macro to Communicate with EXCEL or WORD
