Import Excel password list

Help
Marina
2013-09-09
2013-09-10
  • Marina
    Marina
    2013-09-09

    Hi all!

    I´m trying to import a list of passwords (thousands of them) that´s saved as an .xls file. I tried Paul´s xml-converter from here because I have a grouped structure in my xls that I want to contain. However the script seems to either be faulty or I am too stupid. I have modified my xls according to the instructions (with Subgroup1, Subgroup2 etc as headers and then the keepass-specific fields) and exported it as CSV.
    It then creates an xml which has trouble with the grouping. I started with a small testfile with only a few entries and 2 Groups containing one or more subgroups. This seemed to work ... then I thought it´s fine to add in the rest of the data but suddenly it imported only one of the groups (adding all the other data to the root group).
    Am I missing something? Importing everything group by group seems to work but impossible considering the amount of data :-(
    any ideas what I might be missing?

    thanks in advance

     
  • Marina
    Marina
    2013-09-09

    Hi Dominik!
    thanks for replying. I tried importing the CSV first but it doesn´t support groups. I´d have to manually import each group seperately which is a heinous task considering the numbers... :-(

     
  • Dominik Reichl
    Dominik Reichl
    2013-09-09

    The generic CSV importer does support groups.

    Best regards,
    Dominik

     
  • Marina
    Marina
    2013-09-09

    according to this it isn´t. I know the thread is a little outdated but it seemed legit. I am aware that there´s a Group-field to add when importing. But how does it know my data-structure from a csv file? I can only set a Group delimiter (choosing from ".""\""/"). The CSV has one delimiter for the whole file only

    it would be awesome though, if I could use the generic csv imort!!

     
  • Dominik Reichl
    Dominik Reichl
    2013-09-09

    The thread you've linked to is about the KeePass 1.x CSV format. This format is documented in detail on http://keepass.info/help/base/importexport.html#csv and it indeed is true that it doesn't support groups.

    Anyway, this is irrelevant. The generic CSV importer can import almost all CSV files, not just the KeePass 1.x CSV format. And the importer does support groups.

    Without knowing how your CSV looks like, I cannot give any explicit instructions which settings for the generic CSV importer are correct.

    Best regards,
    Dominik

     
  • Paul
    Paul
    2013-09-09

    Can you post a sample of data for us to test - munge the sensitive data.

    cheers, Paul

     
  • Marina
    Marina
    2013-09-09

    ah ok, thanks for pointing that out. Seems like wasted a lot of time there ... :-) anyways, here´s a sample of how my csv is structured. The first row is the header, delimiter ; and it should be grouped by Location and Subgroup (inside locations of course).

    Location;Subgroup;Alias / MID;Links;Beschreibung;User;Passwort
    ARZ;DELL Blades;C8690046.m286 - Chassis Harz;;;root;xxx
    ;;;;;admin;xxx
    ;;C8690047.m286 - Chassis Barz;;;root;xxx
    ;;;;;admin;xxx
    ;diverse;Dell I/O Aggragator Harz_A1;;Blade-C8690046.m286;admiss (ro User);xxx
    ;;Dell I/O Aggragator Harz_A2;;Blade-C8690046.m286;admiss (ro User);xxx
    ;;Dell I/O Aggragator Barz_A1;;Blade-C8690047.m286;admiss (ro User);xxx
    ;;Dell I/O Aggragator Barz_A2;;Blade-C8690047.m286;admiss (ro User);xxx
    VARZ;;A0001915/A0001919;;IBM DS3400;Admin;xxx
    ;;A0001912;;ESX System Adapter;root;xxx
    ;;A0001914;;iDrac6;Admin;xxx
    

    how can these groups be imported?
    many thanks in advance

     
  • Dominik Reichl
    Dominik Reichl
    2013-09-09

    When you import this CSV, e.g. the third line will result in an entry in the root group with a user name 'admin' and a password 'xxx', because the first fields are empty. KeePass' behavior is perfectly correct.

    But of course it's not what you wanted. You expected an empty cell to repeat the value of the first non-empty cell above it. This is an interpretation that KeePass must not make (because in general it's not the correct way to interpret data), thus you need to fix your spreadsheet first. Empty cells must be replaced by the correct data. For example, the third row should read: ARZ;DELL Blades;C8690046.m286 - Chassis Harz;;;admin;xxx

    The fastest solution to do this that I can imagine is the following:
    - Select the very first empty cell that actually should repeat the previous content (in your example this is A3).
    - Enter "=X" (without the ", and X should be replaced by the cell identifier above the empty cell; e.g. for A3 it would be A2, so you'd enter "=A2"). Press Enter.
    - Press Ctrl+C.
    - Select all the empty cells that should repeat the previous content and press Ctrl+V.

    Then try the export and import again.

    Best regards,
    Dominik

     
  • Dominik Reichl
    Dominik Reichl
    2013-09-09

    Oh, and KeePass expects the group path to be stored in one cell per row only. You could e.g. create a new empty column at position 3, in the first cell of the new column enter

    =A1 & " -> " & B1

    and copy and paste this into all cells below, too. With this, the third column contains all the values of the A column and the B column delimited by " -> ".

    In the generic CSV importer, specify " -> " (without the ") as delimiter.

    If one of the values in the A or B columns contains " -> ", use a different separator string.

    Best regards,
    Dominik

     
  • Marina
    Marina
    2013-09-10

    thank you so much! I wasn´t sure how keepass would behave so I was hesitant to alter the table. this should go into the official documentation :-)

    again thanks so much for your help
    greetings
    marina