Title: CSV import error
Last modified: August 20, 2016

---

# CSV import error

 *  Resolved [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/)
 * Hi,
    I have installed the plugin in wp version 3.4.2 . I have this csv for testing
   initially [http://demos.softwareinbangladesh.com/dvd/csv-1.zip](http://demos.softwareinbangladesh.com/dvd/csv-1.zip)
   But when I try to upload this it shows this error `Warning: Invalid argument 
   supplied for foreach() in /home/softwar/public_html/demos/dvd/wp-content/plugins/
   woocommerce-csvimport/include/woocommerce-csvimport-functions.php on line 109`
 * Can you please help me fixing what’s the problem ?
 * Thanks in advance for help
 * [http://wordpress.org/extend/plugins/woocommerce-csvimport/](http://wordpress.org/extend/plugins/woocommerce-csvimport/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/csv-import-error/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/csv-import-error/page/2/?output_format=md)

 *  Thread Starter [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132095)
 * When I upload import.csv that comes with the plugin , it works great.
 * But after customization it doesn’t work anymore.
 *  Plugin Author [allaerd](https://wordpress.org/support/users/allaerd/)
 * (@allaerd)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132130)
 * Hi there Abdul,
 * I checked you’re file. It’s fine but it has the wrong line endings. Open you’re
   file in you’re text editor and convert te line endings to unix style.
 * I tried it and i have now 3 nice product in my webshop with Dalmatians 😀
 *  Thread Starter [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132132)
 * Hi Allaerd Mensonides,
    Can you please give me the customized version of csv 
   file which worked ??
 * So that I can understand how to make it work.
 * Thanks a lot for helping.
 *  Plugin Author [allaerd](https://wordpress.org/support/users/allaerd/)
 * (@allaerd)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132134)
 * You can download it [here](http://allaerd.org/plugins/test.csv)
 *  Plugin Author [allaerd](https://wordpress.org/support/users/allaerd/)
 * (@allaerd)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132135)
 * or download the zip [here](http://allaerd.org/plugins/test.csv.zip)
 *  Thread Starter [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132137)
 * Actually I am not sure what you did.
 * Can you please describe me the process ??
 * Thanks a lot for spending your valuable time in hwlping me.
 *  Thread Starter [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132144)
 * Fixed it.
 * Thanks a lot.
 *  Plugin Author [allaerd](https://wordpress.org/support/users/allaerd/)
 * (@allaerd)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132145)
 * hehe,
 * even did something better. Try version 0.5.4 i added an option in the settings
   page where you can select to auto detect line endings!
 * It should work now with most files!!
 * but glad you solved it you’re self a well!
 *  Thread Starter [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132243)
 * Hi Allaerd,
    ANother question for you. Do I need to fill up all the fields in
   a csv file ??
 *  Plugin Author [allaerd](https://wordpress.org/support/users/allaerd/)
 * (@allaerd)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132245)
 * Hello,
 * You do not need to have all the fields. The name, description and SKU i would
   recommend!
 *  Thread Starter [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132246)
 * I want to have name, category, price & image. Can you kindly send me a format
   for this ?
    I have this ([http://demos.softwareinbangladesh.com/files/p.zip](http://demos.softwareinbangladesh.com/files/p.zip))
   but not working, so I need your help.
 * Thanks
 *  Plugin Author [allaerd](https://wordpress.org/support/users/allaerd/)
 * (@allaerd)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132248)
 * hi Abdul,
 * I tried you import and it worked fine. Remember to set the field separator too
   a comma. If you do not supply the SKU every time when you import new product 
   will be made. The SKU prevents this. instead of insert it will update!
 *     ```
       title,Description,short_description,Category,stock,Price,regular_price,Sales_Price,weight,length,width,height,sku,Picture,tags,tax_status,tax_class
       101 Dalmatians [Platinum Edition] [2 Discs] [DVD],,,Kids & Disney,,9.99,,,,,,,,http://i1276.photobucket.com/albums/y469/abamedvds/DPekSKhgGClW1kkuwOrYqSndEbHQ9MqOfdX_zps67f4916b.jpg,,,
       101 Dalmatians 2 Patch's London Adventure DVD,,,Kids & Disney,,9.99,,,,,,,,http://i1276.photobucket.com/albums/y469/abamedvds/lCxtD2Gm23_Qse0Fe9-_XQmiJVKR5TW0HjB_zps61aab1ab.jpg,,,
       101 Dalmatians 2: Patch's London Adventure [Special Edition] [DVD],,,Kids & Disney,,9.99,,,,,,,,http://i1276.photobucket.com/albums/y469/abamedvds/lCxtD2Gm23_Qse0Fe9-_XQmiJVKR5TW0HjB_zps61aab1ab.jpg,,,
       101 Dalmatians Platinum Edition 2 Discs DVD,,,Kids & Disney,,9.99,,,,,,,,http://i1276.photobucket.com/albums/y469/abamedvds/DPekSKhgGClW1kkuwOrYqSndEbHQ9MqOfdX_zps67f4916b.jpg,,,
       15 Years After by Enigma Audio CD,,,Concert & Music,,64.99,,,,,,,,http://i1276.photobucket.com/albums/y469/abamedvds/41FVbUFSHaL_zps65e54ea3.jpg,,,
       ```
   
 * These lines i tried. You can see the result [here](http://woo.allaerd.org)
 * The link will be updated shortly! Soo check it today 😀
 *  Thread Starter [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132249)
 * You mean I need to add SKU for all products ??
 *  Thread Starter [Abdul Awal Uzzal](https://wordpress.org/support/users/mamb2b/)
 * (@mamb2b)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132250)
 * In my site, when I upload the codes you mentioned in last comment it’s taking
   only 1 product. The last one.
 *  Plugin Author [allaerd](https://wordpress.org/support/users/allaerd/)
 * (@allaerd)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/csv-import-error/#post-3132252)
 * it uses the sku for updating the lines when you run it more than 1 time. So if
   you only upload it once. delete all you’re products and upload it. When you upload
   it multiple times….i need the sku to be there!

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/csv-import-error/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/csv-import-error/page/2/?output_format=md)

The topic ‘CSV import error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-csvimport_aa9366.svg)
 * [Woocommerce CSV importer](https://wordpress.org/plugins/woocommerce-csvimport/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-csvimport/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-csvimport/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-csvimport/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-csvimport/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-csvimport/reviews/)

## Tags

 * [Import problem](https://wordpress.org/support/topic-tag/import-problem/)

 * 17 replies
 * 3 participants
 * Last reply from: [allaerd](https://wordpress.org/support/users/allaerd/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/csv-import-error/page/2/#post-3132273)
 * Status: resolved