Explainable recommendation systems primarily utilize users' ratings and corresponding reviews to make recommendations and generate meaningful explanations. However, most explainable recommendation methods only consider one aspect of sentiment in the reviews and lack sufficient exploration of the review texts. Besides, these methods often rely on deep neural networks and do not adequately consider how to effectively integrate extracted information into the pre-trained model to improve the quality of explanation text. In this work, we propose SAPER, which is the first end-to-end framework that combines sentiment analysis and prompt learning in explainable recommendations. For the rating prediction task, we employ multi-granularity sentiment analysis, simultaneously incorporating coarse-grained and fine-grained information from review texts to capture user preferences and item characteristics. For the explanation generation task, we design a multi-level approach that integrates user and item IDs, as well as rating information, as soft prompts into the pre-trained model to generate personalized explanations. Experimental results demonstrate that our model outperforms state-of-the-art baseline models on three datasets. In particular, we validate the effectiveness of multi-granularity sentiment analysis and soft prompt strategies. Experimental analysis indicates that the recommendation explanations generated by the SAPER model are semantically closer to actual reviews.