Opening a Model MPH File
To extract model definitions or results to an Excel® worksheet you need to link the workbook with a model loaded in a COMSOL server. You can directly open the model from Excel. If it is not already running, this starts a COMSOL Multiphysics server in the background where the model is loaded. You can open any new Model MPH file or open a model already linked in the workbook.
Opening a new Model
Under the File Excel ribbon tab click COMSOL to access the COMSOL Backstage view.
Click Open (), and again Open (), then find the model MPH file and click OK.
The model geometry, or a result plot when one is available in the model file, is displayed in an external graphics window. In Excel, the model name is inserted into the worksheet, see Figure 2-8.
Figure 2-8: Spreadsheet after model import.
The model description and image, if contained in the model file, are also inserted. In addition, a comment is added to the cell selected before loading the model with the text COMSOL Model. This comment is used by LiveLink™ interface to maintain the connection between the worksheet and the model on the COMSOL Multiphysics server.
The comment is automatically updated if you save the model under a different name. Removing the comment breaks the link between the workbook and the model.
Opening a Linked Model in the worksheet
If the worksheet already contains a cell link with a model path you can open directly open the associated model. Under the File Excel ribbon tab click COMSOL to access the COMSOL Backstage view. Select Open > Open linked (), to open the file with the path defined in the cell comment link.
Opening a Model from Database
You can choose to open a model from a Model Manager database. Select File inside the Excel user interface, then click COMSOL to access the COMSOL Backstage view. Click Open > Open from database (), this opens a window where you can click any available Model Manager database () to open models from that database. For more details, see Opening Models from Databases in the Model Manager Reference Manual. Select a model and click the Open button () to load the model in the COMSOL Multiphysics server and create a link to the model in the worksheet.
Unlike a regular model import, the file path is not displayed below the cell comment that link the model. Instead you will see the model title.
Opening Recent Model
Under the File Excel ribbon tab click COMSOL to access the COMSOL Backstage view. Click Open (), and then Recent (), to get the list of the recent files open in a Multiphysics Server. Select the desired file and click OK to load the file in the server and establish the connection with the worksheet.
Opening a Model Containing User defined Physics Interface
If the model contains a user defined physics interface created using the COMSOL Physics Builder, you need to save the compiled archive (.jar) in your user home folder .comsol/v64/archives. Any compressed archive (with extension .jar) is loaded next time the COMSOL Multiphysics server starts.
Opening a Model with a Class Kit License
For Class Kit License (CKL) type, you need to start a COMSOL Multiphysics server with the class kit license, see the Preference Settings to start a server with Class Kit License.