Excellent question. The short answer is yes, it is absolutely possible to automatically generate an Excel file from a Jedox report.
However, there's a small but important clarification: the file will be saved in the Jedox File Manager, not directly in the Designer.
Let's break down why and how.
The Clarification: Designer vs. File Manager
- Designer: This is the development environment where you build and edit your reports (the
.palo workbook files). Think of it as the place for your "source code." You don't save output data here.
- File Manager: This is a dedicated storage area on the Jedox server. It's the correct place to save generated outputs like Excel files, PDFs, or CSVs. You can access it via the Jedox Web interface. Its server path is typically
//storage/.
So, the process involves creating a job that reads your report from the Designer, generates an Excel file from it, and saves that Excel file to a folder in the File Manager.
The Primary Method: Using Jedox Integrator (ETL)
This is the most robust, common, and recommended way to automate this task. It's designed for exactly this kind of server-side automation.
The process involves creating an Integrator job and then running it on a schedule.
Step 1: Create an Integrator Project and Job
- Go to the Integrator component in Jedox Web.
- Create a new project (or use an existing one).
- Inside the project, create a new Job.
- For the "Job Type", select
Report-Export. This job type is specifically made for this purpose.
Step 2: Configure the Report-Export Job
You will need to configure a few key settings:
- Connection: Select your
localhost connection (or the relevant server connection).
- Source Report Path: This is the path to your report in the Designer/Report Manager.
- Example:
/Default/Public/Reports/MySalesReport.palo
- Target File Path: This is the destination for your Excel file in the File Manager. You must use the
storage prefix.
- Example:
//storage/exports/MySalesReport_Output.xlsx
- You can make the filename dynamic using variables (see below).
- Target Format: Select
xlsx for a modern Excel file or xls for an older format.
- (Optional) Using Variables: To make the report dynamic (e.g., for the current month or year), you can define variables in the job and pass them to the report.
- In the Integrator Job, define a variable, e.g.,
VAR_MONTH with a Groovy script to get the current month: return new Date().format('yyyy-MM').
- In the Target File Path, you can use it like this:
//storage/exports/MySalesReport_${VAR_MONTH}.xlsx
- In your Jedox Report, name a cell (e.g.,
varMonth) and the Integrator will automatically populate it before exporting.
Step 3: Schedule the Job for Automation
- Go to the Scheduler component in Jedox Web.
- Create a new task.
- Give it a name (e.g., "Daily Sales Report Export").
- In the "Task Type" section, select
Jedox Integrator Project.
- Select your Project and the
Report-Export Job you just created.
- Set the schedule (e.g., daily at 7:00 AM, every Monday, etc.) using the cron-like scheduling options.
- Save and activate the task.
Now, your Jedox server will automatically run the job at the specified time, generating a fresh Excel file from your report and saving it in the /storage/exports/ folder in the File Manager.
Alternative Method: Macro-based Export (Manual Trigger)
If you don't need full, scheduled automation but rather an "on-demand" export triggered by a user clicking a button within the report itself, you can use a Jedox Macro.
- Create a Button: In your Jedox Web report, add a button.
- Create a Macro: In the Macro editor, write a PHP macro that uses the
palo_getdata_export() function.
- Link the Button: Assign the macro to the button's
on-click event.
Conceptual Macro Code:
<?php
function export_report_to_excel() {
// Define parameters
$server = 'localhost'; // Or your server IP/name
$port = '7777';
$user = 'admin';
$password = 'admin';
$database = 'Biker';
// The path of the report to be exported (source)
$report_path = '/Default/Public/Reports/MySalesReport.palo';
// The path where the file will be saved (target)
// NOTE: This path is relative to the Jedox Suite/storage/downloads directory
$export_file = 'MySalesReport_Export.xlsx';
// Define export options
$options = array(
'path' => $report_path,
'export_format' => 'xlsx',
'export_target' => 'file',
'export_file' => $export_file
);
// Execute the export
$result = palo_getdata_export($server, $port, $user, $password, $database, $options);
// (Optional) Provide feedback to the user
if ($result) {
// You could provide a download link or a success message
api_set_value('A1', 'Export successful!');
} else {
api_set_value('A1', 'Export failed!');
}
}
?>
Key Difference: This method is user-triggered, not automatically scheduled. The file is typically saved to a temporary location for the user to download immediately.
Summary of Methods
| Feature | Jedox Integrator (Recommended) | Jedox Macro |
|---|
| Automation | Fully automated, scheduled (daily, weekly, etc.) | Manual, user-triggered (on-demand) |
| Trigger | Time-based schedule | User clicks a button in the report |
| Use Case | Nightly reports, data distribution, archiving | Allowing users to get a snapshot of the current report view |
| Complexity | Moderate, requires setting up an ETL job | Simple, requires a small PHP script |
| Storage Location | Jedox File Manager (//storage/) | User's browser download / temp server location |
In conclusion, for your requirement of an automatically saved file, the Jedox Integrator is the perfect and intended tool for the job.