Setup Sheet as Spreadsheet

The operations worksheet.

HSMWorks has so far included a single setup sheet generated in HTML for easy visual presentation. However, some users prefer might prefer different formats than HTML. We have therefore in HSMWorks 2010 R2 included a new setup sheet which outputs to a Microsoft Excel 2003 supported format.

HSMWorks uses the post processor to generate setup sheets for a high degree of flexibility. The post processor has been designed primarily for purpose of text-based output so whenever you need to interchange data with other applications you should choose a text-based format to simplify the post development when possible.

In this case we generate the setup sheet in Microsoft Excel 2003 XML format. The post processor has built-in support for XML processing (ie. E4X extensions for JavaScript) simplifying XML generation significantly.


Normally when making setup sheets for presentation the layout of the information would be managed within the post itself. However, in some cases it is better to split the underlaying information from the layout since users would often be happy to customize the presentation only. For this particular setup sheet the layout is specified as an ordinary Microsoft Excel 2003 XML file. The benefit is that we can now easily customize the layout inside Microsoft Excel without having to change anything in the post at all.

There naturally has to be some kind of binding between the layout/style and information. In this case the information is pulled into the spreadsheet using special variable tags that the post recognizes and substitutes with the approprate information. The post simply looks for text beginning with a $ and looks up the following ids in its internally available information. For instance the text “$program.cycleTime” and “$operation.tool.diameter” are replaced with the total cycle time and the diameter of the tool for each operation. All information is included in the spreadsheet in the appropriate type (ie. numbers are represented as numbers in the spreadsheet) of the information so you can make direct calculations in the spreadsheet based on the generate NC information.

The new setup sheet and its accompanying layout/style template are named “setup-sheet-excel.cps” and “setup-sheet-excel-template.xls”, respectively. The post will automatically open Microsoft Excel after posting to allow the user to print the setup sheet. For more accurate cycle time you need to specify the rapid feed (“rapidFeed”) and the tool change time (“toolChangeTime”) in the post dialog under properties.

The post will automatically translate any texts in the template into the active language using the normal post translation rules. However, the user is still free to write text in the template in any language. The default layout is composed of 3 worksheets: an overview, an operation list, and a tool list. The layout has already been setup to fit properly on a page when loaded.

The operations worksheet.

The tools worksheet.

Note┬áthat the generated file also can be opened in OpenOffice Calc. You have to choose “Microsoft Excel 2003 XML” to open the file. If you want to customize the default layout remember to store the template specifically in the Microsoft Excel 2003 XML format and not any of the other available formats..