GridIron

Importing Data from a CSV File

Importing Data from a CSV File into GridIron

CSV (Comma-Separated Values) files are one of the simplest and most reliable ways to structure and store data for import into GridIron. This article will guide you through what a CSV is, how to create one, and how to use it as a data source for your table, list, or grid.

1. What Is a CSV File?

A CSV file is a plain-text file format used to represent tabular data. Each line in the file corresponds to a row in the table, with values separated by commas.

Example:

NAME,JOB ROLE,PHONE
Alice,Manager,123456
Jeff,Accountant,362521
Claire,Payroll,485256
Jane,Stock Buyer,149823
Bob,Warehouse Operative,789101
Winston,Driver,865484

This structure is easy to read and widely supported across spreadsheet programs, databases, and web tools—including GridIron.

2. Benefits and Limitations of CSV

Benefits:

  • Lightweight and easy to create or edit.
  • Supported by almost all spreadsheet software and text editors.
  • Ideal for structured, tabular data without formatting.

Limitations:

  • Must use Markdown for formatting (bold, color, formulas, merged cells).
  • Easy to misconfigure due to character encoding or inconsistent line endings.

3. How to Create a CSV File

You can create CSV files in multiple ways. Here are two common approaches:

Many common CSV Editors exist on the Mac such as Numbers, Excel, and Table Cruncher

Option A: Using LibreOffice Calc (or Excel)

  1. Open LibreOffice and choose Calc Spreadsheet.

  2. Enter your data in the cells.

  3. Go to File > Save As.

  4. Choose Text CSV (.csv) as the file format.

  5. If you get asked in the Export Text File settings:

    • Use UTF-8 encoding.
    • Set the field delimiter to a comma ( , ).
    • Tick “Quote all text cells” if needed.

Saving a CSV file from LibreOffice Calc

UTF-8 encoding is essential to prevent strange characters from appearing on your website—especially for accented letters or non-English symbols.

Apple Numbers can also export in CSV format. However, instead of saving the file in the normal 'save' window, it is necessary to use the Export window and set the export options accordingly.

Option B: Using a Plain Text Editor

  1. Open any code or text editor (e.g. VS Code, VSCodium, TextMate, Zen).
  2. Write your content manually using commas to separate each column.
  3. Save the file with a .csv extension, e.g. team.csv.

Working with CSV data in VSCododium

Working with CSV files in a code editor like VS Code, VSCodium, or Zen is surprisingly fast and easy, even if you don't have much of a code background. The above screenshot was taken in VSCodium with the Rainbow CSV extension installed. This extension color-codes each column of data and pads it for a more table-like appearance.

4. Common Pitfalls to Avoid

  • Inconsistent delimiters: Ensure commas are used, not semicolons or tabs.
  • Leftover formatting comments: Exported files sometimes include metadata—always check and clean the first few lines.
  • Mismatched quote characters: Watch out for extra double quotes from Excel or older software.
  • Hidden characters: Open the file in a code editor to double-check what's really there.

5. Uploading the CSV File

There are three main ways to make the CSV file accessible to GridIron:

Option A: Upload via FTP

  1. Use an FTP client like FileZilla, Cyberduck, Forklift or Transmit.
  2. Upload your yourdata.csv file to your server—e.g. /htdocs/files/yourdata.csv.

This method is sometimes referred to as warehousing.

Option B: Drag the File into RapidWeaver Resources

  1. In RapidWeaver, open the Resources section.
  2. Drag your .csv file into the Resources window.
  3. In GridIron settings, use the Set Link button to choose your CSV file in the Resources list.

Option C: Upload with a CMS (Content Management System)

Most CMS platforms have a file or media manager. These let you upload files, and most allow you to easily grab the link to the uploaded file. WordPress, pictured below, is a prime example of this.

The advantage of a CMS like WordPress is that changes made remotely to the CSV file take effect in the published page, without needing to open RapidWeaver or Stacks App and republish the changes each time.

6. Linking to the CSV File in GridIron

Now that your CSV file is available online, it's time to configure GridIron:

  1. Add a GridIron stack to your page.
  2. Under Type, select Local (default).
  3. Set the link to your CSV file using the Set Link button.

7. Preview and Style Your Output

Once the file is linked:

  1. Click Preview in RapidWeaver or the Stacks App.

  2. You should see your table or grid rendered using the CSV data.

  3. Use GridIron’s options to:

    • Filter or search data
    • Apply responsive layouts
    • Change row styles or table borders
Previous
Getting Started