Example: Formatting an Excel Component
You can show and hide input and output expressions as you format the Excel component, and you can add an Excel component in the header and footer.
|
You cannot copy the expressions from this example.
|
Showing and Hiding the Input and Output Expressions
1. Define a 5 x 5 identity matrix, and assign it to an Excel component.
2. Click inside the Excel component block and hide the input expressions and output expressions by clicking the
icons next to the
Inputs and
Outputs labels.
3. Click the
icons to show the input and output expressions.
Displaying Other Cells in the Component Table
1. Define a 9 * 9 matrix.
2. Insert a new Excel component and assign matrix M to the Excel component.
The component table shows the top-left part of the Excel table. You cannot see the entire matrix.
3. Resize the Excel component so that you can view the entire matrix.
4. Restore the Excel component’s default size.
5. Double-click the component table and in Excel, scroll right and down to view the bottom-right side of the matrix.
The Excel window now shows the area you scrolled to, but the component table inside the PTC Mathcad worksheet still shows the top-left corner of the table.
6. In Excel application, press Ctrl+S and close the Excel book.
Alternatively, double-click the Excel component.
The component table inside the PTC Mathcad worksheet now shows the top-left cells that are viewable in the Excel workbook.
| If you press Ctrl+S and do not close the Excel window, the component table is updated as well the Excel worksheet. |
7. Double-click the component table again and inside Excel add a new worksheet.
The component table shows the new blank Excel worksheet.
8. Switch back to Sheet1.
Formatting the Component Table
1. Display the top-left corner of the component table.
2. Double-click the Excel component table and format each cell’s font size, font color, alignment, and merge cells.
3. Update the Excel window.
Formatting tools like those in the Excel application are available from your PTC Mathcad worksheet.
Adding an Excel Component in the Header and Footer
1. Double-click the header and add an Excel component.
2. Define an input expression and click outside the Excel component.
The Excel component table is not updated. An Excel component, like any other region is not updated if it is placed in the worksheet header or footer.
3. Click the Excel component block and on the Math tab, in the Regions group, click Delete Region.