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
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.
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
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.
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!
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! 😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.