Ship To Company Codes: Go to Admin→ Companies→ Ship To
Supplier Codes: Go to Admin→ Companies→ Suppliers
From this window, you can view all the created 'Codes' and their associated 'Descriptions'. The below guides show examples for "Ship To", but are relevant for both. Use the export button these to export these to Excel.