technonaturalist

image link to hive image link to ko-fi

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:

  1. 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
  2. save the file, and keep it in csv format rather than changing to the native format of the spreadsheet
  3. using phpmyadmin, go to the database and find the users table, and select import
  4. 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 :)