Announcement

Collapse
No announcement yet.

CSV Import Error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    CSV Import Error

    Hi there

    I've had to Import a Snapshot of our website to a new computer, have refreshed, made a variety of amendments, uploaded and not had any problems.

    However, when I've exported the catalogue via CSV, saved it under a slightly different name, amended product codes and tried to import the spread sheet I get a load of error messages reported all saying the same thing .....

    Wrong number of fields. Expected 58 but got 57.

    However if I re-import the original csv no errors are reported.

    I've not actually deleted anything so I'm at a loss as to what I've done. Any suggestions?

    Hayley

    #2
    I thought I'd seen this error before so I did a search on "Wrong number of Fields" and brought up several threads discussing the issue.

    Comment


      #3
      Thanks Jo

      I had a spot of deja vue but couldn't find anything - I think I was using a difference search phrase so thank you. I'll take another look

      Comment


        #4
        I found a few threads all with different solutions, hence I didn't bother to point you to any one in particular

        Comment


          #5
          If you open a csv file in excel, make changes and save it, excel remove any trailing tabs, which in terms of a csv removes fields from the end of the file. The standard workaround for this is to add a field to the end of the CSV with a value in it for every row in the work sheet, you then just ignore this field when you map the file on importing.

          Regards,
          Jan Strassen, Mole End

          Comment


            #6
            Jan.

            this "tip" must be one for the AUG - I've spent the evening trying to force a re-import where many entries only had 58 fields not 83 fields.

            most of the entries at the end of the products were CustomVars and I've already reported a problem whereby new customVars do not show up on existing products - now I look closely, these are the very products without the custom vars ! - another problem solved??

            I even copied the last 30 or so fields in a "known good product" to the "bad products" (admittedly the last 30 fields or so were blank, so have probably been truncated

            Now you give the solution, its obvious !

            Comment


              #7
              I've just added a new "customVar" to the end of the import, set a dummy value and re-imported, Every errored entry has now re-imported
              Thanks Jan - hours of work solved in minutes !

              Perhaps the "import" function needs to be changed to set the missing trailing values to NULL and still try to import, if the NULL values fail, then generate an error message !

              On that same score, it would be MUCH more helpful if the error file of such imports gave the "product reference" or the "section name" etc with the line number thats in error - I'm finding that some of the error line numbers seem to be "1 or 2 lines off" where the actual problem is

              Comment


                #8
                I have had instances where my fragments containing a large amount of text/html were truncated in excel on export and saving. Not sure of the limit but I think it's (for excel 11 - 2003) about 32K characters - I think it's much less in older versions.

                Comment

                Working...
                X