BoldMinded Docs
  • Overview
  • Advanced Categories
    • Docs
      • Installation
      • Requirements
      • Setup & Configuration
        • Hidden Config Options
        • Multi-Site Manager
      • Template Tags
      • FAQs
  • Ansel
    • Docs
      • Installation
      • Upgrading
      • Requirements
      • Settings
      • Usage
        • Channel:Form
      • Troubleshooting
      • Template Tags
      • Publisher Support
    • FAQs
  • Bloqs
    • Docs
      • Why Bloqs?
      • Features
        • Add Bloq Menu
        • Nesting
        • Cloning
        • Drafts
        • Bloq Usage
        • Deprecated Bloqs
        • Caching
        • Profiling
        • Bloq Components
        • Bloq Groups
      • Installation
      • Requirements & Compatibility
      • Setup & Configuration
        • Hidden Config Options
      • Creating Bloqs
      • Template Tags
        • Twig/Blade
        • Examples
      • Context Variables
      • Add-on Developers
    • FAQs
  • Carson
    • Docs
      • Installation
      • Requirements
      • Fields
        • Omni
          • Hidden Config
        • Assistant
        • SEO
      • Troubleshooting
  • Custom System Messages
    • Docs
      • Installation
      • Requirements
      • Variables
      • Template Tags
  • DataGrab
    • Docs
      • Installation & Upgrading
        • Upgrading from 3 to 4
        • Upgrading from 4 to 5
        • Upgrading from 5 to 6
      • Requirements
      • Troubleshooting
      • Configuring Imports
      • Running Imports
      • Automatic Imports
        • Importing with cron
        • Importing with cron (Deprecated)
      • Endpoints
      • Configuration Options
        • Config File Options
        • Increasing PHP memory limit
      • Import Types
        • CSV
          • Importing into Grid or Matrix field
        • JSON
          • Example file
        • WordPress
        • XML
          • Example file
        • Creating your own import type
      • Assigning Authors
      • Field Types
        • Assets
        • Ansel
        • Bloqs
        • Calendar
        • Channel Images
        • Date
        • File
        • File Grid
        • Fluid
        • Grid
        • Low Events
        • Relationships
        • Simple Grids & Tables
        • Tag & Tagger
        • Matrix (Deprecated)
        • Creating your own fieldtype
      • Publisher Support
    • FAQs
  • Feature Flags
    • Docs
      • Installation & Upgrading
      • Requirements
      • Configuration
      • Template Tags
      • A/B Testing
    • FAQs
  • Fluidity
    • Docs
      • Installation & Upgrading
      • Requirements
      • Configuration
      • Demos
    • FAQs
  • Logit
    • Docs
      • Installation
      • Requirements
      • Configuration
    • FAQs
  • Publisher
    • Docs
      • Installation
      • Requirements
      • Issues & Tips
      • Languages
      • Template Tags
        • Forms
        • Email Notification Templates
        • Channel:Form
        • Twig
      • URL Translations
      • Auto Translations
      • Diffs
      • Drafts
      • Categories
      • Phrases
      • Persistence
      • Performance
      • Add-ons
        • First Party
        • Third Party
      • Hidden Config
      • Extending Publisher
    • FAQs
  • Reading Time PRo
    • Docs
      • Installation
      • Requirements
      • Configuration
      • Template Tags
  • Reel
    • Docs
      • Installation
      • Requirements
      • Settings
      • Field Tags
    • FAQs
  • Simple Grids & Tables
    • Docs
      • Installation
      • Requirements
      • Template Tags
      • CSV File Imports
      • Field Settings
      • GraphQL
      • Advanced Configuration (deprecated)
    • FAQs
  • Sitemap
    • Docs
      • Installation
      • Requirements
      • Configuration & Usage
    • FAQs
  • Snaptcha
    • Docs
      • Installation
      • Requirements
      • Configuration
      • Template Tags
      • Developers
    • FAQs
  • Speedy
    • Docs
      • Installation & Updating
      • Requirements
      • Configuration
      • Template Tags
      • Static Caching
        • Real World Example
      • Frontedit Support
      • Control Panel
      • Migrating from CE Cache
      • Diagnostics
      • CLI Commands
      • Cloudflare Support (Reverse Proxy Purging)
    • FAQs
  • Trek (unreleased)
    • Docs
      • Configuration
    • FAQs
  • Queue
    • Docs
  • Dexter
    • Docs
Powered by GitBook
On this page

Was this helpful?

  1. DataGrab
  2. Docs
  3. Import Types
  4. CSV

Importing into Grid or Matrix field

Importing data into a field that allows repeating data is a bit trickier using a CSV file but can be done if the data is formmated correctly

Last updated 3 years ago

Was this helpful?

Data format

To import multiple rows of Grid (or Matrix) data, you need to have multiple rows of data in the CSV file. These rows should be identical and contain all the data for the entry you want to import, and also have a way of identifying that the rows all belong to the same entry. The Title field may work here but a unique id (such as a product or stock id is better).

A simple example is:

ID,TITLE,IMAGE,LABEL,DATE
1,Rhubarb,https://brandnewbox.co.uk/images/uploads/bnb1.png,"Image 1","2011-01-01"
1,Rhubarb,https://brandnewbox.co.uk/images/uploads/bnb2.png,"Image 2","2011-10-01"
2,Armadillo,https://brandnewbox.co.uk/images/uploads/bnb3.png,"Image 3","2011-01-01"
3,Bananas,https://brandnewbox.co.uk/images/uploads/bnb4.png,"Image 4","2011-01-02"
3,Bananas,https://brandnewbox.co.uk/images/uploads/bnb5.png,"Image 5","2011-01-03"

Here, each entry has some common data (ID, TITLE, DATE) and some data that changes for each row of the Grid/Matrix (IMAGE, LABEL).

DataGrab configuration

You can then set up the Grid/Matrix as normal. You probably want to delete any existing rows if you are doing an update. For a one-time import, you can ignore the Action to take when an entry is updated option.

We are also importing the unique ID field to the GUID custom field.

DataGrab configuration

DataGrab configuration 2

To let DataGrab know which CSV rows are related to which entry you need to set up the “Use this field to check for duplicates” option to a field (custom or Title). If DataGrab finds an entry that has a matching value in this field (in our case the GUID custom field) it will update and append the new Grid rows to the existing entry.

You also need to check the “Update existing entries” to get it to update (rather than overwrite or ignore).

DataGrab configuration 2