We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Plugin: CSVGrab

Development and Programming

giovanni's avatar
giovanni
203 posts
17 years ago
giovanni's avatar giovanni

getting a little further:

I now i have this working but it only loads one record!

{exp:csvgrab url="/home/giovanni/domains/mydomain.com/public_html/files/ssfv.txt"
weblog="12"
title="1"
delimiter="TAB"
encloser="QUOTE"
use="2|3"
fields="first_name|last_name"}

here is my file tab delimited: <pre><code>a fsdergel Mattdw b Adews Micdad c SFfredy sowhat<pre><code>

here is what it reports when i run it: Checking: a Found: a

New entries: 1

       
jtnews's avatar
jtnews
62 posts
17 years ago
jtnews's avatar jtnews

Hi, just checking in, but last I looked, there was no solution (or, otherwise, method given) for using the entry_date and expiration_date fields. Is this still the case?

Thanks.

       
jeremydouglas's avatar
jeremydouglas
292 posts
17 years ago
jeremydouglas's avatar jeremydouglas

I’m trying to import to a custom date field. Does anyone have pointers on this? I’ve tried a couple different formats (10/22/07 12:00 AM and 2007-01-01 12:00 AM). The entries end up 1969-12-31 02:00 PM. (I see there was a post here about that. Don’t see a solution though.

So, I’m thinking there is a formatting conflict? In the database it says 2007. Not sure what’s up. Help?

@ jtnews - maybe using the offset for the entry_date would work? I’ve tried to make that work with no success either, but I’m not exactly sure how it should work.

       
jeremydouglas's avatar
jeremydouglas
292 posts
17 years ago
jeremydouglas's avatar jeremydouglas

I know it’s been discussed earlier, and I’m not sure where it’s at. Currently for me it’s ignoring duplicate titles. It would be nice to have an option whether to allow or disallow duplicate title fields.

       
Geof Harries's avatar
Geof Harries
109 posts
17 years ago
Geof Harries's avatar Geof Harries

I would buy somebody many cases of beer if they could figure out how to map the CSV date to an entry date in EE. Anyone up for the beer-soaked challenge?

       
jeremydouglas's avatar
jeremydouglas
292 posts
17 years ago
jeremydouglas's avatar jeremydouglas

I would use the CSV date to entry on an ongoing basis… I second Geof’s challenge!

       
jtnews's avatar
jtnews
62 posts
17 years ago
jtnews's avatar jtnews

Count me in as a solid third.

       
Geof Harries's avatar
Geof Harries
109 posts
17 years ago
Geof Harries's avatar Geof Harries

Some very good news for people seeking an update to this CSVGrab plugin.

Andrew and I have recently worked together to deliver a new version that includes the ability to import dates directly from the CSV file. I’ve only tried it with dates formatted in this manner, “2007-10-12”, so I don’t know what will happen with other formats.

To use, simply add date=”” with your desired column from the CSV file.

The updated file is attached as pi.csvgrab.php.zip.

geof

       
Mike Verbruggen's avatar
Mike Verbruggen
37 posts
17 years ago
Mike Verbruggen's avatar Mike Verbruggen

Thanx for the update.

This plug is the best pi. off all.

       
jtnews's avatar
jtnews
62 posts
17 years ago
jtnews's avatar jtnews

Can we do time as well? I’m trying to use this for an events calendar. Thanks for the hard work thus far!

       
Geof Harries's avatar
Geof Harries
109 posts
17 years ago
Geof Harries's avatar Geof Harries

jtnews - That’d be up to the author, Andrew, to decide. I was only seeking date import at present.

       
Andrew Weaver's avatar
Andrew Weaver
206 posts
17 years ago
Andrew Weaver's avatar Andrew Weaver

Just to follow up Geof’s post above:

I’m hoping to restart development of this plugin in the very near future. Its probably the most useful plugin I have written, but has got neglected as I personally don’t use it very often.

I’ll check through this forum for feature requests and bugs, but feel free to add ideas or ‘PM’ me if you have any particular requests.

       
jeremydouglas's avatar
jeremydouglas
292 posts
17 years ago
jeremydouglas's avatar jeremydouglas

I’m really glad to hear that Andrew. Definitely importing a date and time to a custom field would be my top request. I haven’t had a chance to try out the update yet, but hopefully will later on today.

       
Rob Quigley's avatar
Rob Quigley
236 posts
17 years ago
Rob Quigley's avatar Rob Quigley

Good to hear that further development on this plugin will continue. Typically there’s a couple different ways to accomplish something with EE but I found that when I needed this plugin there was no other option to accomplish the task at hand and that it was the difference between success and failure. So, thanks for posting that you’ll keep this going forward!

       
Joelle's avatar
Joelle
272 posts
17 years ago
Joelle's avatar Joelle

I’m not clear on how this functions, so I thought I would ask. 😊 I’m having a challenge getting my entries to import without it spitting out big fat php errors and importing a bunch of rubbish.

{exp:csvgrab url="http://domain.com/myfile.csv"
                          weblog="5"
                          title="1"
                          skip="6"
                          delimiter="TAB"
                          encloser="QUOTE"
                          use="2|3"
                          fields="body|extended"}

Obviously, the link to the file is pointing to the right place, I’ve just changed it for this posting.

I think I’m just not totally sure what each of the parameters does. I figured out that weblog=”5” is the weblog I want to import into, not the one I want to grab from, which is great, though I’d love to be able to specify from which weblog I wish to pull the entries that live in the .csv file.

Furthermore, I’m not sure why I’m skipping 6 lines or using “TAB” or what the encloser is or what the use parameter does. Does the fields parameter pull from the .csv or import those fields to the new weblog?

I did read any docs I could find and this entire thread, along with any other information I could find on it and I’m still having a tough time. I know in the first post, the plug-in author gave a very brief “key” to the parameters, but something a little more specific would be great.

Any assistance would be appreciated. Thanks! 😊

       
First 3 4 5 6 7 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.