CSVToTable v2 was released in November 2020. This update provides some minor compatibility improvements for use in certain themes, relating to the padding on table cells. You can login to your Paddle account to see if you are eligible for this free update. If CSVToTable is listed in your Paddle account, you can download this newer version for free.


Using CSVToTable is as simple as attaching your CSV file as a Resource in RapidWeaver, and linking to this new file from the CSVToTable settings. CSVToTable does all the complicated and repetitive coding for you.

Completed tables use standard HTML markup and are compatible with all web browsers and devices. If the table is too wide, horizontal scroll bars are applied.

Example

This example uses the default stack settings and a sample CSV file that was added as a resource in RapidWeaver, to display data from a weather station.



Setup

CSVToTable works much the same as any other stack.
  1. Start by adding a suitable CSV file as a Resource in RapidWeaver.
  2. Drag and drop a copy of CSVToTable from the Stacks Library into your webpage.
  3. With CSVToTable selected in edit mode, open the Stacks side panel.
  4. Set the link to the CSV file you just added as a Resource.
  5. Preview the webpage to see the generated table.
  6. You can adjust any further colour or style settings as required.

Linking to your CSV file

Because the CSV file is parsed and converted into a table using jQuery Javascript, it is only possible to use a CSV file hosted on the same web server that CSVToTable is published on. Otherwise you risk getting a 'CORRS' error, which is a safeguard web browsers use as part of the security settings. It's easiest to add your CSV file as a resource in RapidWeaver. Alternatively you can login to your hosting account using FTP, and manually upload a CSV file.

Creating CSV files

All spreadsheet software and code editors are capable to generating CSV files. If using spreadsheet software (like Numbers, LibreOffice or Google Docs) ensure that you export the CSV file in plain text format, without any additional comments or encoding. CSVToTable os able to work with both comma and tab separated file formats. Alternatively a setting exists within the stack to use a different separator type, if the need arises.