Sheets can only be used if both the server and the computer of the development system have a local Microsoft Excel installation.
Sheets are used to integrate Excel workbooks into the processing of values.
Excel Workbooks consist of one or more sheets. Each field in such a table is addressed by an address that is composed by one or more letters for a column and a number for a row.
B1, for example, indicates the field of row 2 in column B.
This address is connected to the name of the table and thus addresses a field in a table:
Sheet2!B1 adresses the cell B1 in Sheet2.
A range can be used to define areas:
Sheet1!B1:B10 marks the range of cells 1-10 in column B of Sheet1.
The fields in excel can contain text or values, but also formulas that are defined by an introductory equal sign.
TCE now combines expressions that refer to features in the object structure with fields in an Excel workbook as the input size and veriables in an object structure as initial sizes.
Example:
As shown in the following images, the features saw length, material type and material thickness can be entered in cells in a sheet in an Excel workbook and calculated values can be taken back in Excel and variables can be assigned to variables.
The Excel sheet is a small sample of calculating the minimum and maximum saw speed with input of saw length, material type and material strength.
Now we want to automate this excel sheet with TCE. We build a class where the excel workbook is embedded to. We create a sheet variable named Sawing and the required input and output variables in this class. We create a form for entering the input variables and displaying the output variables.
The sheet variable Sawing contains the excel sheet and is defining the mapping of input and output variables to Excel cells. If the excel sheet is linked to an excel file in the file system, the maintenance of the file can be done separately.
The sheet variable is included into rule validation. With each change of the values of the variables the content of the excel workbook is recalculated automatically.
The output form may look like the following: