You can provide any format to an exported workbook by referencing an existing template file. This specifies an existing template file to use for exporting the file. Out[2]= | |
This creates the new workbook based on the template file. Out[3]= | |
The template contains a named range that defines where to put data in the report. Out[4]= | |
It also contains a named shape to display a graphic. Out[5]= | |
This simulates rolling two six-sided dice 500 times. This writes the trial data to the report. This displays a histogram to the named shape.
This defines the file name for the report workbook. Out[11]= | |
This saves the report workbook to disk. Out[12]= | |
This closes the workbook once you have finished exporting data to it. This cleans up by deleting the exported workbook file. |