Make your application as soon as possible. Ideally, you should apply at least three months before the start of your study program in Spain.
What is the basic step-wise process for applying for Spanish student visa?
STEP 1: Download the National Visa Application Form.
STEP 2: Complete the National Visa Application Form.
STEP 3: Gather the required documents.
STEP 4: Submit the application with the documents at the Embassy of Spain