Skip to content

09. Import and Export

JoomlaBoat edited this page Sep 22, 2022 · 1 revision

Import CSV file

To import CSV file to any table add {{ html.importcsv() }} tag to Catalog Layout. It will render an Upload button to import CSV files.

CSV File header will be compared to table field names to import the data to correct fields.

If no match found or the first line of the CSV file is not a header with field names then the field order will be used.

After the data import complete the web page will be reloaded automatically.

Export to CSV, JSON and XML

To export table to CSV add "{{ url.format() }}" tag. It will render a CSV icon (button) with the link to download CSV file that contains same table and same fields as the page you have CSV icon on.

Another option is to create a separate layout to import the data to CSV, to render the page content as CSV.

Also adding &frmt=csv to the page url will force Custom Tables to convert the output to CSV

Formats available: csv, json, xml

Import exported table structure

You can import exported tables to Custom Tables.

This functionality makes it easy to setup new website.

Exported table(s) file is a JSON encoded text file that contains table structure, fields, layout and menu item.

Below is an example of how to import "Appointments" Demo example.

Download. appointments.txt file. Click using mouse right button and press on "Save Link As"

Follow steps:

Step 1 Go to Components/Custom Tables - Dashboard and click on "Import Tables" button

Step 2 Click on "Upload" button

Step 3 Select exported table file (*.txt)

Step 4 Done. Go to Custom Tables/Tables to see the new tables.

Export functionality available in Custom Tables Pro version only.