There are probably some third-party packages that accomplish this, but nothing explicit in Sun's API. (Well... In a Servlet, you can set the response type as Excel, but I don't think that's what you're asking.)
In any case, this is not a topic for the SCJP exam, so I'll move this thread to Java in General (beginners).
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org