This looks very promising for an application I have coming up, but is there no way to set the entry date/time and expiry date/time using values from a CSV file?
I have a patched version that does entry and expiration date/time, and a few other minor fixes. With Andrew’s permission I will post it here, or be happy to give it back to him for merging.
Dan
I am having absolutely no luck with getting the plugin to Grab my data.
Maybe someone will catch something I’m missing. My csv file has been uploaded.
My Grab template looks like:
{exp:csvgrab url="http://www.jrwildkits.com/import_data/2006_FW_b_roster.csv"
delimiter=","
weblog="3"
author_id="1"
title="1"
category_group="2"
category_field="3"
use="4|5|6|7|8|9|10"
fields="number|first_name|last_name|age|grade|weight|position"
unique="title"
}
{/exp:csvgrab}
I’ve tried both a full path to the csv file as well as a relative path with no success.
Yes, my weblog exists as well as the category group and its categories.
If I’m correct I don’t need the site_id parameter because this site is not part of an MSM install.
Any pointers would be much appreciated.
Thanks
(ah…I’ve also uploaded the xcel file that has created the csv doc, maybe I’ve missed something there???)
Your first line has the name of the fields in it, so you need to either get rid of it, or tell CSVGrab to ignore that first row.
There is no encloser in your example, so use “” instead.
I just imported 1200 entries over the weekend to a client site using CSVGrab. It does work. 😊 I’d add site_id = 1 as well. It might not be required, but if you use this a more of a howto for the next time you need to use it, you’ll remember to have site_id in a MSM setting.
Hi
Quick Question before I carry on with project, Can you use this for multiple csv files??? if not can someone point me in the right direction where I can upload excel workbook sheets.
Cheers in advance
L
EDIT
Help as soon as I posted this csv went mad and i keep getting this error:
Notice: Undefined index: id in /home/sites/directfleetsolutions.co.uk/public_html/office/plugins/pi.csvgrab.php on line 331
Notice: Undefined index: id in /home/sites/directfleetsolutions.co.uk/public_html/office/plugins/pi.csvgrab.php on line 332
Notice: Undefined index: format in /home/sites/directfleetsolutions.co.uk/public_html/office/plugins/pi.csvgrab.php on line 332 MySQL ERROR:
Error Number: 1054
WHAT HAVE I DONE???????
END EDIT
Just been using this to import a product data file from an affiliate network and it’s pretty handy!
2 things I’d like to see (i.e. be prepared to pay for)
1) Put a default value into a field. The site I’m working on draws in data from multiple source files and a field which indicates the source is needed, but not contained in the input files without some pre-processing. Maybe a quote-bound value in the ‘use’ parameter rather than pulling a field from the CSV?
2) Add in data into a relationship field Not trivial I know, but would be incredibly for migrating relational databases into EE. My site has a weblog ‘brands’ created entirely manually, I’m importing data files of products into a ‘products’ weblog which have a ‘brands’ relationship field which link the two together. Being able to import the brand name into the relationship field in the products weblog would be very useful indeed.
If there’s another route to achieving (2), maybe by importing a value into a text field and then some sort of bulk update….?
Hi
I have started again with the plugin and have followed the docs to a T but I am not outputting anything?
I have put a trace in and nothing is happening.
Can someone help!!!
Here is my code
<pre><code>{exp:csvgrab url=”http://79.170.40.176/directfleetsolutions.co.uk/testy.txt” trace=anything delimiter=”TAB” encloser=”QUOTE” site_id=”2” weblog=”2” category_group=”3” title=”1” category_field=”6” use=”2|3|4|5|7|8|9|10|11” fields=”der|otr|dealer|dis|fund|intro|bus24|bus36|per24|per36” unique=”der</code></pre>” }
i have also just tried url=”testy.txt” as this rectified the problem I was having before, this time though it is not working.
Can someone advise….any help appreciated
Cheers
L
If Andrew (or someone) would modify the plugin or make a similar one called something like “CSVUpdate” so it COULD be used for updates, I would be jumping for joy.
I second this request… would be very useful to update rather than duplicate entries. Any chance of this happening?
If not, is there another route to importing/updating multiple weblog entries? Kinda surprising EE doesn’t handle .csv import natively.
I think there might be a bug relating o the unique parameter, but could be that I’ve misunderstood how it works.
here’s my template:
{exp:csvgrab url="http://mycomain.com/mycsv.csv"
weblog="2"
title="10"
skip="1"
delimiter="TAB"
encloser="QUOTE"
use="11|21|22|32|2"
unique="title"
fields="productBody|productLargeImage|productLink|productPrice|productMerchant"
}
If I run this twice I end up with 2 lots of data in the weblog
If I add an extra value to the unique parameter e.g..
unique="title,productMerchant"
…then it dedupes OK.
I agree that an option to update would be excellent, part of this job is a price comparison section that regularly updates the file. My only other option is to delete the weblog in the admin area and re-run the whole lot every time.
Andrew, could you add that to the quote you gave me? If I’m going to do this I’d rather do it all at once.
This looks very promising for an application I have coming up, but is there no way to set the entry date/time and expiry date/time using values from a CSV file?I have a patched version that does entry and expiration date/time, and a few other minor fixes. With Andrew’s permission I will post it here, or be happy to give it back to him for merging. Dan
Dan, did you ever work it out with Andrew to allow publishing your code addition here, the one that allows the import of entry and expiry dates (with or without times)? :D :D
It doesn’t seem to be in the code for the latest version of the CSVGrab plugin. Thanks,
Rob
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.