Skip to main content

KnowledgeBase

Reading and writing with Excel

excel_keyvisual.png

The scripting function in the FVA-Workbench makes it possible to read data from or write values to an Excel file. For example, input values for a gear can be read directly from an Excel file in order to set the corresponding attributes in the gearbox model in the FVA-Workbench. The results of the calculation can then be written to the Excel file.

Formatting of the Excel file or cells can be done directly in the script using functions such as setBackgroundColor("B4", Red). Alternatively, a formatted Excel file can be imported as a template. The formatting of this file is used, and only the values in the specified cells will be added or replaced.