This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Swapnil, if you want help with your problem you're going to have to start by explaining what it is. Your last post explained nothing at all about either your problem or the question you were asked about it.
Please describe the problem in more detail. What are you trying to do? Why? What do you already have working? What is not working?
The title of your post talks about formatting excel through java. There are various libraries which provide this capability. However, your actual post says you want to do this using selenium. This part I don't understand. Selenium has nothing to do with Excel.