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.