Drupal 6 notes: dealing with a users.csv file
posted on: Thursday, 19 May 2011 @ 11:02pm in
tagged
Think I’m one of the few people on the planet who could have trouble with something as basic as this.
Problem: csv dump of the users table will not import no matter how you tweak the settings.
Solution:
- open csv file in NeoOffice (or whatever your spreadsheet thingi of choice is). I had to edit mine to change the user1 in the csv to uid 2 as there is already a user1 in the D7 it will be going into, other people may not need to edit theirs
- save the file, and keep it in csv format rather than changing to the native format of the spreadsheet
- using phpmyadmin, go to the database and find the users table, and select import
- browse for the csv file, leave all settings as they are, press go
In my case running the thing through NeoOffice stuck semi-colons all over the place which apparently made it easier for phpmyadmin (or MySQL, not sure which) to deal with. User table inserted.
I guess it could conceivably work for any other troublesome csv file in any other table assuming all the table settings and whatnot are right :)
This work is marked with CC0 1.0 Universal