How to work with Excel files in Java is a frequently asked question, so we have a page about it in our FAQ: Accessing File Formats.
One of the simplest ways to get data in a format that Excel understands is by writing it in a CSV file (comma-separated values). If you want to do more sophisticated things, then have a look at one of the libraries mentioned on the FAQ page.
It's a bit unclear to me what, exactly, you're asking help with, but APIs such jExcelApi and Apache POI both can create Excel files. I concur with Christophe that the way to add charts for embedding in an Excel file would be to create those using a Java library (such as JFreeChart) and add them as images to the Excel file. Both libraries mentioned above can do that.
Joined: Mar 04, 2010
This question is asking to write the output into a file, and then open it via excel ..
Besides, I am not really familiar with the methods you've mentioned.
In other words, it's required to write code that does that ..
Have you checked out the web sites that go with those libraries? They contain plenty of example code to get you started. Or were you expecting that people here would write the code for you? That's not really how JavaRanch works.