Exchange Workbook Using the COMSOL® API
The COMSOL API provides commands to exchange file with the model, set the filename including the Excel extension (.XLSX) to specify workbook.
See the COMSOL Multiphysics Programming Reference Manual for the following feature:
In the case the client/server connection such as using COMSOL with MATLAB, the Excel file is available on the client machine.
Importing Workbook Using the COMSOL API
To load an Excel file type:
model.feat.loadFile(<filename>, "sheet", <range>);
where <filename> is the Excel filename including the .XLSX extension. <range> is the top-left cell range from which to import the data.
Exporting Workbook Using the COMSOL API
To save an Excel file type:
model.feat.saveFile(<filename>,"sheet",<range>,header,overwrite);
where <filename> is the Excel filename including the .XLSX extension. <range> is the top-left cell range to which saving the data. header is a Boolean you set to true to include the table header and false to not include the table header. overwrite is a Boolean you set to true to overwrite nonempty cells without warning and false to not overwrite nonempty cells without warning.