Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Exporting Data to Excel
PhixFlow can export data to Excel automatically as part of an analysis model. We just need to tell it what data to use, what to call the file and where to send it.
Example
In this example we will send Invoice Stats data to an Excel file and place this on our server.
You will need:
- A table that holds your data, we will use a table called Invoice Stats.
SolutionSolution
- Place your mouse over the Invoice Stats and from the popup menu select
.Insert excerpt _file_exporter _file_exporter nopanel true - A file exporter is automatically created, a push pipe is added and its properties open on the right.
- Complete the Basic Settings:
- Provide a useful Name, for example
Export Invoice Stats
. - Tick Enabled. This enables the file to be exported. Typically this is only unticked during testing to avoid generating lots of data.
- File Name is the name the exported file will be given, it is an expression field:
- For static text, simply encapsulate the desired text in quotes, such as
"Stats.xlsx".
- For dynamic text use an expression to generate a name, such as:
"Stats_"+today()+".xlsx"
, which will provide the file name Stats_20200419.xlsx. The expression must return a string.
- For static text, simply encapsulate the desired text in quotes, such as
- Output Directory determines where the file will be placed inside the export directory on the server, unless Ignore Base Directory is ticked. More information on the settings can be found in File Exporter. This is also an expression.
- Export File as set to
Excel Spreadsheet.
- Overwrite existing file can be ticked if you always want to overwrite files that have the same name. For example, if you only require one Stats.xlsx file on the server at any one time.
- Header is ticked so the output Excel file has column headers.
- Your setup will look similar to the following:
- Provide a useful Name, for example
- Click
to save your changes.Insert excerpt _finish _finish nopanel true - Run analysis on Invoice Stats and the data will be sent down the push pipe to the exporter and a file will be produced on the server. The location of the export directory is specified in Administration Menu → System → Configuration.
More Information
For more information on on the available settings see File Exporter.
Setting Specific Values in an Excel Template
If you need to export specific attributes into specified Excel spreadsheet cells, see Excel Template.
Sending Files By Email
Files including Excel spreadsheets can be sent to recipients using the file exporter. For information on configuring this see File Exporter.