Monday, June 27, 2016

Finished: User Creation

I have now completed the 'crUser' subroutine for my program, this creates a User by adding their details to an Excel Database as well as adding their own folder under the 'users' folder in the programs directory.

The first thing the program does is to check whether or not the file exists, printing an error message to the screen if the file cannot be found.

After this it creates a file directory under the 'Users' folder, using the OS module (os.mkdirs)


The next step finds the last empty row in the spreadsheet then uses a while loop to add all the details into cells in that row until all necessary details have been added.
This then ends by saving the worksheet, ending the while loop and returning a message to confirm that the user's details have been added to the database.
In addition to this, I have also created a very similar program for adding admin users - which adds different details and can only be accessed by existing program admins.

No comments:

Post a Comment