Use the CPYFRMIMPF command to create a CSV file on the IFS. The open it with excel. You can also look into using the Apache POI APIs to create the sheet in excel directly from your program.
Check the archives for examples of how to do both of these.
You can also use ODBC to download directly from your AS/400 to a spreadsheet… here is a step by step tutorial for downloading AS/400 to Excel.
If you have Client Access installed on your system then you should have the ODBC driver to do this.
There are also lots of third party software packages that allow you to query into spreadsheets.