Adding an Excel document to your model
In order to create an Excel document with Berkeley Studio, you’ll need to have both an Excel template and a model. The assembly of Word documents is discussed in previous sections. The basics of these are explained in Introduction to document assemby.
The Excel document generation works about the same as the Word document generation with text fragments. There are certain ways we can do this. Here is an example model for the Excel document generation. The template also needs to be downloaded, here. We create the text fragments just like to do for Word documents and use them in the Excel document. In Add document we saw how we can add the document link and add text fragments to a document. This works the same for Excel documents except we put the text in a single cell.
Delete row or column
With Excel you have the ability to delete rows and columns. This can be done by creating a text fragment as shown below. This can be used when you want to delete for example an employee from your company overview. In order to delete a column instead of a row you just check the “Delete column” checkbox.
The use of loops can be handy when you want to loop over all your employees in your overview and add or change a cell. The big difference with Word here is that loop-starts and loop-ends have to be set together. Because Excel is two dimensional there is no way of automatically determine which loop-end belongs to which loop-start. Therefore, a loop needs an identification, so <loop.IDENTIFICATION> and </loop.IDENTIFICATION>. Identification may be a number or a text, as long as start is the same as end. In the example model we call the subgraph whilst having changed the variable name. This will also work with different variables from the model. In order to use loops we use a loop identifier and specify the direction we want this loop to go in. This should look as indicated by the picture below.
This loop is called “rutger” and the text fragment can be found in the graph “ginhoud”. Afterwards the name of the text fragment is specified just like in a word document, here the name is Excel. This will result in the text being printed as much as your model specifies. In our example this will be three.