You mean something like Simple Invoices | An Open Source, Web-Based Invoicing System
Since you originally wrote,
Presently I am working on a project for a store
I would've thought it'll be quicker and possibly cheaper to use something off-the-shelf (open source, free or otherwise).
Now I have an experience with building desktop applications before and have managed to build up the UI.
if you really have to build, I interpret the above as you can already get the data (via the UI), and so any of the techniques/libraries mentioned at Create PDF with Java - Stack Overflow
should be able to help you do what you need.
Exporting data to Excel can be as simple a generating a CSV file (that Excel can read and display), or by using a library (just search the Internet for "java excel") to create a "proper" xls file.