Hi Please take 17230 Sabari Express from HYB to MAP (Morappur station: it is in Dharmapuri district) , train reaches at 04:38 a.m. - from here you can get TN state buses to Dharmapuri, option 2:if not you have to get Down at SALEM Junction : train reaches around 5:30 a,m. : From Salem you can get frequent buses to Dharmapuri....
One more option : take train 16353 Kacheguda- Nagercoil Express (but its Weekly , it run only on Wednesdays from KCG, starts at 16:00), it will reaches SALEM Juction on thursdays 09:30 a.m.- From Salem you can get frequent buses to Dharmapuri....