If you need/want to extract all your countries and states here's what I found works. It's human readable, but another format would be needed if you wanted to do something with it programatically. If anyone has thoughts on making the output better please share.
- Create a package.xml file somewhere (contents will be pasted below)
- Open workbench
- go to Migration>Retrieve
- Open the package.xlm you created
- Click next
- When done it gives you a zip file
- Extract the address.settings file
- Open in notepad++
- Copy all
- Paste to this online converter
- leave the options as-is
- Enter countriesAndStates as the starting node
- Save to csv
Package.xml is like this:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Address</members>
<name>Settings</name>
</types>
<version>45.0</version>
</Package>
@* Salesforce Administrators * @Admin Group, Raleigh, US @Solo Admins
Awesome, thanks @David Roberts !
That way does indeed dump out all the country and state codes, but it doesn't associate the states and countries or tell you if they are active like my original post.
So depending on your needs, we now have two different methods.