Im not sure if this is the right place to post this sorry if its not, i followed the tutorial on how to set up the CSVGrab, but when i have gone to test I get the following error (swapped site name for mysite)
Warning: fopen(mysite/DFS.csv) [function.fopen]: failed to open stream: Connection refused in /home/sites/mysite/public_html/office/plugins/pi.csvgrab.php on line 192
Warning: fgetcsv(): supplied argument is not a valid stream resource in mysite/public_html/office/plugins/pi.csvgrab.php on line 202
Warning: fclose(): supplied argument is not a valid stream resource in mysite/public_html/office/plugins/pi.csvgrab.php on line 478
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? That would be so nifty!
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.
to your attributes. CSV’s produced by Excel don’t have them unless necessary. But fgetcsv(), as used by CSVGrab, may fail if that parameter is not specified.
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.
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:
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….?
I struggled a little with this to. I think there is a problem with the Plugin on servers with Php 5. I made a similar installation with EE 1.6.4 one to different servers, one with PHP Version 5.1.6 and one with PHP Version 4.3.9, and with the old version it works.
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.
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,
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
No, I haven’t gotten a response. I also sent a message via the contact box on Andrew’s website, but didn’t hear from him. There is no copyright notice on the code, but neither is there explicit permission to modify and distribute, so I am a bit reluctant.