I'm dying here....

Using drupal 7:
I can't get a csv import to nodes completed using feeds. I've made sure it's UTF-8 coding. I've mapped to custom content and I've tried standalone forms. I've created simple 4 field, 3 row tables and can't get them to import. Import on submission on, import on submission off. I tried using the canned node import 'importer'. I installed the stable version, I installed the dev version. I've scoured the boards looking for an answer. I've watched videos, I've tried to follow tutorials but most are D6 and my module just ain't built that way.

All to no avail.

When it does go through an import I end up with an 1 empty article and no new content.

I'm on bent knee, broken and battered... I submit. Oh great Jedi, please bestow upon me, an unworthy padawan, the knowledge to beat this foe.

...seriously... before i lose my ever-lovin' mind.

rudyard

Comments

grient’s picture

I've struggled with Feeds as well, in the past. Did you make sure your csv file has headers? Although there is an option for this, I remember that I could only import data if my csv file had the appropriate headers. It's a long time ago so I'm sorry that I cannot be of more help here. Let me know if this solves your problem.

rudyard55’s picture

But, the files have header...still no dice.

rudyard55’s picture

Finally... got it to work... going to post what I was doing wrong in hopes that it helps someone else...

Ok... I wasn't mapping correctly... here is everything you need to do for a "plain vanilla" csv import

  • make sure the file format is correct - UTF-8, with double quotes on each field. Use open office or notepad to format if needed.
  • make sure you have one unique field in your file (at least one)
  • make sure the file extension is ".csv"
  • move the file to the server and into your X:\sites\YourSiteName directory
  • Create a custom content type with fields for everything except a title and guid
  • create a new importer (/structure/feeds importers)
  • Basic settings: attach to content = standalone form, periodic import=off, import on submission = checked
  • Fetcher: http fetcher
  • http fetcher: autodetect and pubhub off
  • Parser: csv parser
  • csv parser: defaults
  • processor: node processor
  • node processor settings: do not update node (that's what I used), plain text, content type=select the content your created to be imported into.
  • mapping: map your unique field to the GUID. Map something to the title. Then map the rest to the fields you created. (I removed the body)
  • save it all
  • goto /yoursite/imports
  • select the importer you created and path to your file that you put on the server.
  • Import the file...cross your fingers and say a prayer in Klingon.
rteijeiro’s picture

I followed your steps and it works like a charm.

Later I did some changes and it works with the "File upload" fetcher too.

I think my error was selecting a content type in "Attach to content type" instead of "Use standalone form" option in "Basic settings".

I hope this information will help others.

Thank you again for sharing ;)

Ruben Teijeiro
Drupal Hero

rudyard55’s picture

Glad you got it working. Sounds like you were in better shape than I was. I had it all messed up :D

rhip’s picture

It was these steps which solved my problems.

  • Basic settings: attach to content = standalone form
  • map your unique field to the GUID

Thank you, thank you, thank you... ... ...

rudyard55’s picture

Glad it worked :)

alberto56’s picture

If it does not work as expected, make sure you also have your line breaks set to "unix" in your csv file.

mwbyrd’s picture

I've been trying to get feeds set up to import from a remote URL. This shouldn't be a problem only I can't find where to tell the Feeds Module what URL to upload the data from.

Does anyone know where to enter this information?

Thanks,

Mike

veeray’s picture

I am also having this problem. I don't see a setting for pointing the fetcher to my file and as a result I dont have anything in my mappings screen.

elakiyasamuel’s picture

Change fetcher to HTTP fetcher.You will get url filed to upload.

jecs89’s picture

Thank you, it was useful.

I had problems like (Incorrect string value: '\xE4\xC5\xCC\xC9\xD3\xD8...' for column 'contents' at row 1) to import .csv

I work on Windows 7, i created .csv using excel after i copy the data of csv file.
I opened notepad, copy the data of csv and save it with codification: utf-8.

veeray’s picture

Hi could you explain how you formatted your csv. would an empty field have to look like this "", ? I am not even sure how I can create a csv where that is the case because my csvs only quote text fields.

thumbslinger’s picture

Seems if on a Linux/Ubuntu system, either lf or utf-8 works

veeray’s picture

I do not have the columns from the csv available to me in the mapping screen. Where exactly should I load the csv file into, and where in the settings do I point the fetcher to that csv?

rudyard55’s picture

Cut and paste the column names into the text boxes. They have to match exactly. You can use the file import option to manually load the feed if it's easier than typing the the full path to the file (or if you don't have access to your file structure directly.

jenn_jones’s picture

Thanks for the detailed information here.  This made it a lot easier to get the feed working! 

csander’s picture

Why did you remove the body field? I'm having trouble importing blocks of text with CSV and I'd love to figure out what's going wrong.

rudyard55’s picture

Just because I didn't need it.

As an update, using the latest version I'm having success using the file upload functions now also.

Is the text truncating on you? Have you tried importing into a custom field of long text type instead of body?

smd_ksu’s picture

Hopefully this helps someone, spent hours trying to figure out why certain things would or would work when importing a CSV file with Feeds. This might be specific to Mac's and/or to Office 2008, not sure. Saving an Excel file as a CSV would not work. There is something wrong with the returns between the lines. When starting a new CSV using TextEdit, and just tying in a few lines it worked. If I copied and pasted lines from the Excel CSV into my TextEdit CSV only some lines would import. Figured out if I re-typed the return between lines then all the lines would import. That is too time intensive so I imported the Excel CSV into Google Docs and then immediately exported it as a CSV, to see if maybe it would format it differently. It did, and all lines imported. It's tricky because just looking at it, it doesn't look any different.

bartmann’s picture

Import wasn't working and I'm using Excel 2010 on a Mac, I ran the csv through TextWrangler, then Edit -> Document Options , change Line Endings to Unix (LF). That fixed it and a little easier than running through Google Docs if you have TextWrangler handy (and who doesn't?)

amccoy’s picture

I've experienced additional frustration beyond the excel vs notepad csv formats and line breaks ... I've discovered that docs created on pc, edited on mac, then back to pc cause certain characters to map incorrectly. Notoriously the ":" and "-" seem to pop up as unknown characters in my "agnostic" csv file -- and these will stop the feeds csv importer dead in the water! Best way I found to see these little dings is to open the csv file in MS Word on a pc ... there will be these question mark symbols peppered through the text ... manually replace them with the correct character in context ... resave the file as csv utf-8 ... open in notepad just to confirm ... then re-import with feeds and Voila!
Hope this helps somebody :-)

resslx’s picture

This info worked! This thread is awesome, I spent hours with tutorials thinking I was crazy.

I can confirm the unique needs to be mapped to GUID. I'm also using Google Spreadsheets to export the CSV, as my Excel 2012 was not producing a workable CSV. I'm uploading a file, not using URL.

levsoroka’s picture

MS office on Mac was my problem, line breaks did not work properly.

Thank you

atcoughlin’s picture

i am uploading a CSV file and about 1/2 of the entries show up/are searchable. But, when I upload the file through feeds, it tells me all the nodes (in this case 1015) have been uploaded. Any ideas?

lajpatdhingra’s picture

My feeds are working but creating only empty nodes.

bwoods’s picture

I had this exact same problem with using a URL. When I switched to file upload, it worked. The only thing I can think of is the upload to the server must have knocked out specific settings, or maybe it was a permissions issue, I'm not really certain.

cumpatomas’s picture

In my case the problem was with Excel for Mac 2011 the separator of the CVS files I exported was (;) and not (,) which is the default symbol so I changed it and it worked out. I realized cause I opened the file with Text Edit and I saw it there.
But I still have a problem, I have to erase every time the (;) final from Text Edit otherwise Drupal creates me an empty node :(
Anyone knows how can I export the CVS file correctly from EXCEL?
thanks!

thumbslinger’s picture

In D6 w/node import, I would save as a csv from Excel (this all on Mac) then open in TextEdit and just save as UTF-8.

I had very complicated content-types with numerous fields, urls and such it worked great.

I'm just now trying to get the Feeds working in D7, but as to your issue, that's what I did and it worked fine.

Also, the double-quotes around stuff should only be used if your actual data has a comma as in "1,000" otherwise, you don't need double-quotes.

patoregon’s picture

After a day of frustration I fixed this problem by disabing and uninstalling the Feeds module and Job Scheduler and deleting all Feeds tables from my database. When I reinstalled the Feeds module worked. The problem occurred because I had uploaded about 7700 bad records and deleted them. This didn't delete them from the Feeds tables, though.

plaks’s picture

Hi, am quite confused if this module is suitable to my requirement. So, my requirement is i would like to update some db field values for each node by the values taken from a csv file columns. For Ex: I have field_a and field_b in my xxx node. I would like to update the values of these fields in all the nodes by the input taken from a csv file with field_a and field_b columns with a unique number representing each node. Should i use 'search index' entity name for this? How should i proceed with it? Can someone help me on this?