Function to import SPD from .txt