There are 4 ways how to do it:
2. you can add them one by one in the merchant panel (Affiliates -> Affiliates manager -> Add affiliate)
3. you can import them from a CSV file via Affiliates->Affiliates manager->Import Affiliates.
4. use the API function to create affiliates (you can utilize it with your own php code that reads the affiliate data from a custom file you exported - needs strong programming skills):
(scroll down to the bottom for the example)