Download CSV or Excel Action

Introduction

The Download CSV or Excel Action plugin allows you to effortlessly download data from Joget's datalists in Excel or CSV formats. It also provides flexibility in customizing headers and footers. This plugin is especially useful for handling large datasets and supports background downloads.

The source code for this plugin is available in the JogetOSS repository at GitHub.

Plugin information

  • Plugin Bundle: Download CSV or Excel
  • Compatibility: Joget DX 8

Get started

Where to get the plugin

You can download the plugin's latest release from JogetOSS.

How to install

  1. Download the plugin JAR file from the release page.
  2. Go to Settings > Manage Plugins > Upload Plugin to upload the JAR file to Joget.
  3. Go to the List Builder where you want to add the plugin.
  4. Drag the Download CSV or Excel element from the Actions section to the list.
  5. Configure the plugin by filling in the required properties. For more information, see the Configure Download CSV or Excel Action Properties section.

  6. Save your changes and preview the list.

How to use it

  1. Go to the UI where your datalist is displayed. You will see the Download CSV or Excel button.
  2. Click the button to download the file in the configured format (CSV or Excel).
  3. Open the downloaded CSV file in any file viewer (e.g., Microsoft Excel) to view the contents of the selected rows from the datalist.

Downloading large contents

  1. For large CSV downloads, a download progress bar will appear.
  2. For large Excel files, if you set the Download in Background (Excel only) option to Yes, a new window will appear, indicating that the file is being generated.
  3. Once the file is ready, it will appear in the Downloads section.
    • Downloading with Excel Pop Out Window 2

    • Downloading with Excel File Downloaded

Known issues

When using diverse character encodings (e.g., Arabic, Chinese, Thai), CSV files opened in Microsoft Excel may display gibberish characters.

Two Solutions:

  1. Change Encoding with Notepad++
    • Open the CSV file in Notepad++.
    • From the Encoding drop-down, select UTF-8-BOM.

       After changing the encoding, the issue will be fixed.
  2. Import CSV in Excel
    • In Excel, go to Data > From Text/CSV.
    • Follow the import steps and load the file. The encoding issue will be resolved.

Configure download CSV or excel action properties

Fields to configure:

  • Label: The text displayed on the download button.
  • Download As: Choose between CSV or Excel format.
  • Delimiter (CSV only): Symbol used as a delimiter for CSV files (defaults to a comma if left blank).
  • Include Footer (Column): Includes the footer in the exported file if selected.
  • Confirmation Message:Default joget plugin configuration. Is not used in this plugin.
Advanced settings

Fields to configure:

  • Custom Header: Allows customizing the header row names.
  • Custom Footer: Adds a custom footer to the exported file.
  • Export All Records When None Selected: If no records are selected, all records are downloaded.
File settings

Field to configure:

  • Rename File: Rename the generated file (default is "report.extension").
Download setting

Field to configure:

  • Download in Background (Excel only): Allows the generation and downloading of Excel files to run in the background.

    This config is useful for users who want to download large datasets, as it maintains a connection to the server while generating large files.

    If this config is not turned on when generating/downloading large Excel files, the server might time out. See Downloading Large Contents for the usage.

Form to store file

Fields to configure:

  • Store Files to form: Checkbox that, when selected, enables the ability to store generated CSV or Excel files within the specified form.
  • Form: This dropdown allows to select the specific form where the generated CSV or Excel files will be saved.
  • File Field: This field specifies the file upload field within the selected form that will store the generated files.

Expected outcome

You will be able to export data from your datalists into CSV or Excel format.

Related video tutorials

Download plugin

You can download the plugin's latest release from JogetOSS.

Created by Julieth Last modified by Aadrian on Nov 19, 2024