fixed a couple of data loading errors in loadspreadsheet and caught some exceptions in api.py