Invalid CSV file format - number of columns is not constant!

Invalid CSV file format - number of columns is not constant!

von wildan dio -
Anzahl Antworten: 10
Hello,

I am using version 1.9.

got error when upload user:
Invalid CSV file format - number of columns is not constant!

The CSV File is below:

username password firstname lastname email lang idnumber maildisplay course1 group1 type1
richard ricahrd12 Richard Bef Aco S.Pd user@email.com en 0 1 course1 GehF 1
albet albert34 Albet Kui "Bula, S.Pd" user4@email.com en 0 1 course1 GehF 1

Regards,
Wildan
Anhang csv.jpg
Als Antwort auf wildan dio

Re: Invalid CSV file format - number of columns is not constant!

von Kristy Rhea -
I had the same thing happen to me. It's the "," you have in the lastname field for Bula, S.PD. When uploading as a csv file it recognizes the comma and thinks it is a new field. If you need to keep the commas in, change you separator to ; in Control panel, regional and language settings, regional tab, click settings, and change you list separator. (in windows) , re save your document, upload to moodle, on the upload users page make sure to change the drop down box to ; and upload your users.

By changing this setting in our control panel it will change you list separator for every file. You may run into issues when doing a bulk course creation with csv file if you dont use a comma, but you can always go back into control panel and change if needed.
Als Antwort auf Kristy Rhea

Re: Invalid CSV file format - number of columns is not constant!

von Richard Pinner -
Thanks so much for that - very useful and fixed my problem right away.
Als Antwort auf Kristy Rhea

Re: Invalid CSV file format - number of columns is not constant!

von Adma Lim -
hi, beside the above mentioned char, any other know char that would probably generate the same error message?

Char like:
'
,
Als Antwort auf Adma Lim

Re: Invalid CSV file format - number of columns is not constant!

von Dave Cuttriss -
Also many thanks from me. Saved me a lot of drama with an 1800 entry CSV

Dave
Als Antwort auf Adma Lim

Re: Invalid CSV file format - number of columns is not constant!

von Melanie Scott -
Besides that, sometimes a spreadsheet might start with 50 rows but you delete the data from them...then it show up as having empty rows that leave rows and rows of ,,,,,,,. Instead of deleting the data, you have to delete the whole row.

If you don't, you can open the CSV as a notepad item and delete them. This also makes it easy to see where the problem lies.

I've taken to checking the CSV in notepad before uploading just as a time saver.
Als Antwort auf wildan dio

Re: Invalid CSV file format - number of columns is not constant!

von Mark Timmans -

There is also a Microsoft Bug which may cause issues here. See: http://support.microsoft.com/kb/77295

It states that the last column must contain information in at least every 16 rows otherwise it stops filling in the blanks with ,,,,,,

Als Antwort auf Mark Timmans

nvalid CSV file format - number of columns is not constant!

von mahshid mahshid -

Hi .I upload my file with .csv  format as blow  but i see error message.

plz help

thanks