Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

csv import problem: Found 0 rows
 
junkthemenace
Jr. Member
 
Total Posts:  16
Joined:  2008-05-31
 

I am having problems with importing products.

I exported the products. The file contains a number of simple products and one configurable

Edited the CSV
Checked the text file, field delimiters are “, separated through ,
saved the file as utf8
started import using the import all products profile:

..........

* Starting Mage_Dataflow_Model_Convert_Parser_Csv :: parse
* Found 0 rows
* Starting catalog/convert_adapter_product :: parse

Any ideas how to get this solved

Thanks
Deniz

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brandlive_br
Guru
 
Avatar
Total Posts:  653
Joined:  2008-05-19
Buenos Aires, Argentina
 

You’re importing the same information, with the same attrbiutes and values?

Is it possible that some value that you edited doesn’t exists into the database?

--
Damián

 
Magento Community Magento Community
Magento Community
Magento Community
 
TexanJim
Jr. Member
 
Total Posts:  7
Joined:  2007-12-12
Nottingham, UK
 

Have you checked that your line endings are unix Line Feeds instead of either Line Feed/Carriage returns or just carriage returns?

 
Magento Community Magento Community
Magento Community
Magento Community
 
junkthemenace
Jr. Member
 
Total Posts:  16
Joined:  2008-05-31
 

@TexanJim: Thank you it worked after manually editing the CSV with the mac text editor. I originally exported a Mac Excel file to CSV. Obviously I had only carriage returns as a result of the Excel export.
Is there a better way doing this without having to edit the CSV line by line?

 
Magento Community Magento Community
Magento Community
Magento Community
 
TexanJim
Jr. Member
 
Total Posts:  7
Joined:  2007-12-12
Nottingham, UK
 

I use BBedit on a Mac, you can globally change the line endings of an entire file with the click of a button. If you don’t have it, grab a 30 day demo, open your file and Edit -> Document Options. Change the line endings there. Hope that helps

 
Magento Community Magento Community
Magento Community
Magento Community
 
brandondrew
Member
 
Avatar
Total Posts:  64
Joined:  2007-09-12
 

A quick way to do this from the command line:

tr '\r' '\n' file_excel_munged.csv >| fixed_file.csv

Or, if you want, you can create a function in your .zshrc (or .bashrc or .bash_profile if you use bash):

fixcsv() {
  tr 
'\r' \n' < $1 >| $2
}

and then you can just type the new command with the file names as arguments:

fixcsv badfile.csv newfile.csv

(If it doesn’t work as is, try removing the | character… that might be necessitated by one of my zsh options...)

 
Magento Community Magento Community
Magento Community
Magento Community
 
brandondrew
Member
 
Avatar
Total Posts:  64
Joined:  2007-09-12
 

If anyone knows a way to automatically run a script after saving from Excel (using Apple Events, presumably) please post hints or directions.  Then we could make it so that as soon as you save a CSV in Excel, a script is run to fix it, since the Mac Business Unit at M$ doesn’t realize that Macs stopped using \r almost a decade ago.

 
Magento Community Magento Community
Magento Community
Magento Community
 
scher1981
Jr. Member
 
Total Posts:  13
Joined:  2009-06-08
 

Brandondrew, thanks a lot.  That really helped me and cleared up my issue.

Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Perfume Club
Jr. Member
 
Total Posts:  4
Joined:  2009-07-29
 

thanks for the tip on bbedit

 
Magento Community Magento Community
Magento Community
Magento Community
 
lizlux
Member
 
Avatar
Total Posts:  40
Joined:  2009-08-03
 
brandondrew - 22 June 2009 07:49 AM
A quick way to do this from the command line:

tr '\r' '\n' file_excel_munged.csv >| fixed_file.csv

Worked great!! mUchas gRaciAs

 
Magento Community Magento Community
Magento Community
Magento Community
 
lavluda
Jr. Member
 
Total Posts:  4
Joined:  2010-01-31
 

thanks, worked smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
lynts
Sr. Member
 
Avatar
Total Posts:  102
Joined:  2008-07-08
 

Guys there is something easier, when you get this error and your using a MAC all you do is open the CSV and save as pc excel file not the mac version because the importer doesnt recognize the mac version, so save as pc excel there will be an option in save to do this

 
Magento Community Magento Community
Magento Community
Magento Community
 
goodboatshop
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2011-02-07
 

I was having the same problem with Excel on my Mac, then I switched to Open Office and everything works just fine. No need to mess about with text editors to strip out the line breaks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lifetimemedia
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2010-02-18
 

Thanks lynts! Your suggestion to save as Windows .csv from Excel for Mac worked perfectly for me wink

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top