0

I'm trying to import a CSV file of about 20 items with a number of columns. I was hoping i could import the file and have each of the rows in 1 entry (ie. each row DOES NOT get imported as a separate entry). Ultimately, I would like to output a template that displays the 1 entry and the rows of data associated with that entry.

I have purchased Solspaces Importer, but it appears to import each row as an entry. I really need the entire import to be 1 entry. I hope that's clear.

I will be importing CSV files on a continuous basis. Each import could range from 2 rows to 40rows. Again... Each import should be a single entry.

Any thoughts?

4

Importer allows you to import data from a CSV file into entries, but as you mentioned, by default each CSV row will produce an entry.

How is your data for all rows going to be stored in one single entry?

  1. You might want to consider saving the data in a Matrix field, which Importer supports: http://www.solspace.com/docs/importer/third_party_support/#pt_matrix

    CSV files are limited for this however, given that they are one-dimensional. If importing into a Matrix field, I would recommend using a JSON or XML file, which supports sub-nodes of data.

  2. Alternatively, if you simply want all CSV cells on all rows to map to custom fields in your single entry, you could open up your CSV file in a text editor and do a general search & replace for linebreaks. This should make Importer recognize the data in the CSV file as one row, and therefore one entry.

  3. Another strategy: if each CSV column needs to have all their data in a single entry custom field, you might be able to merge your column data in your spreadsheet editor, followed by exporting to CSV. This will also create one row of data, and therefore one entry, but the data in each custom field should be grouped by CSV column.

Hope that makes sense.

| improve this answer | |
3

DataGrab will import to entries. Typically it will import each row as a new entry but there might be a way around that.

If you can email me at support@brandnewbox.co.uk with an example of what you are trying to do I'll see if I can help you set up DataGrab.

| improve this answer | |
  • Sorry - that was meant to be a comment to Brooks Seymore's post... – Andrew Weaver Jan 23 '13 at 9:59
2

I believe Datagrab should do exactly that... it's been a few years since I've had to use it but it's a pretty powerful add-on.

| improve this answer | |
  • Thanks for the response. Maybe I've missed something. I have a copy of data grab. I thought that it imports all of the info into the database, without creating an entry. I'm not sure how I could import a CSV file and then associate all the data with an entry. – Mark Dodgson Jan 22 '13 at 23:32
  • You might be right, it's been a few years. But, if it doesn't create entries, you might be able to use a Safecracker to push your data into a Matrix field? Create the entries that way? Would that work? – Brooks Seymore Jan 23 '13 at 6:21
  • Thanks Brooks. To be honest I've never used savecracker. Are you thinking that if I upload the CSV file it could be put into Matrix fields. Would it create a row for each table row? I'm going to look into this today. Again... Thanks for your input. It's very much appreciated – Mark Dodgson Jan 23 '13 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.