Excel Import Validation

Hi All

i am working on excel import and it works fine.but i have to implement yii validation for excel template like

(1) tabs count and tabs heading text should be same

(2) inside tabs, headings text and number of heading should be same.

how can i implement it in yii? thanks in advance