2 Using Excel Templates
By the end of this section you will be able to associate a Microsoft Excel template with a view.
About the Excel templates used in this section
In this tutorial section, you will use an Excel template called debtOverview.xls that is already stored on the PhixFlow server.
We have included a copy of this template in train.zip. To see what the template looks like:
Download train.zip and extract the contents to a folder on your computer (indicated as
<path>in the following instructions).Open
<path>\train\excelTemplates\debtOverview.xls. The file opens with one worksheet, called Formatted Data, which shows how the data will be formatted.If the file is protected, enable editing.
There is another, hidden worksheet. To view it, right-click on the Formatted Data worksheet tab and select Unhide.
The Excel file now has a tab called Basic Data. This worksheet is blank, ready for PhixFlow to populate it with data. Once the first sheet is populated, you can use the data in other sheets.
When PhixFlow exports data to Excel, it always writes the data to the first worksheet.
Find the location of Excel templates
In the repository, scroll to the bottom of the list and double-click System Configuration.
Expand the System Directories section.
Make a note of directory specified in the Template Location, which is set to something like
/opt/phixflow/excelTemplates.
Specify an Excel template in a view
Open the model
Screens and Forms 01-08: Views, filters and screensin the workspace.Open the settings tab for the view called
Overall Debt Levels. To do this:First, in the model, click on the
icon to open the settings for theOverall Debt Levelstable.Then, in the settings → Views section, double-click on the view called
Overall Debt Levels.
Add an Excel template to the view. In settings → Advanced section → Excel Template, enter
debtOverview.xls, then click.In the model window, click
.
Export view data to Excel
Open the View →
Overall Debt Levelsand check it has data.In the View, click
in the toolbar and click.PhixFlow opens the Download Data Options window. Click the Download button.
Ensure you have the Item to Download set to
Export All Itemsotherwise you will only export the selected items.
PhixFlow opens a notification pop up to show that the file is ready to download, click Download.
Open the Excel file.
If necessary, Enable Editing.
Unhide the Basic Data worksheet to see the exported source data.
Switch to the Formatted Data worksheet and notice that the debt level is colour-coded.
Screenshot of the formatted Excel data: