Here is a sample template using EXCEL commands:
Cell |
Formula |
Explanation |
A1 |
|
Enter Part Number via Keyboard. |
B1 |
EXCEL_CREATE "c:\monthly_report.xls" : |
Create the file. |
C1 |
EXCEL_SETCOLW 1, 1, 30 : |
Set the width of column A to' 30' and widths of columns B and C to '15'. |
D1 |
EXCEL_SETMARGIN 38, 1 : |
Set left and right margins to one inch. |
E1 |
EXCEL_SETMISC 1, "Monthly Report" |
Set the Header. |
F1 |
EXCEL_WRITE 2, 0, 0, 1, 1, (STAT_STR 10) : |
Write values to the file - Part Number and Description in the first row and labels in column 1. |
G1 |
EXCEL_WRITE 1, 0, 0, 3, 2, LOWERSPEC : |
Write the actual statistical values in column 2. We will later add Excel formulas to calculate the Spec tolerances. |
H1 |
Close the file |
|
I1 |
EXCELCOM_OPEN "c:\monthly_report.xls" |
Open the file for modification. |
J1 |
EXCELCOM_WRITE 6, 2, "=B5-B3" : |
Enter Excel formulas to calculate the Spec tolerances. |
K1 |
Close the file. |
|
L1 |
RUNANDWAIT "C:\Program Files\Microsoft Office\Office\excel.exe c:\monthly_report.xls" |
Launch the file in Excel |
M1 |
Exit out of the template |