RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Using a Java Servlet to Generate Up-To-Date Microsoft Excel Spreadsheets

You don't have to automate Excel or use Jakarta to create simple Excel spreadsheets. Find out how to create them dynamically using a Java servlet.

ind out how to create simple Excel spreadsheets dynamically using a Java servlet.

Spreadsheets play a vital role in the enterprise. Business analysts and management typically use the data in spreadsheets to make critical business decisions. The DevX article "Learn to Read and Write Microsoft Excel Documents with Jakarta's POI" shows you how to read and write Microsoft Excel documents using Apache Jakarta's POI. In this article, I'll show you how you can create simple Microsoft Excel spreadsheets dynamically on a J2EE Web application server. Accordingly, Web site visitors will be able to visit a URL and have the most up-to-date spreadsheet data available to them via their Web browsers. I'll show you how to create your spreadsheets in a Java servlet engine such as that of IBM WebSphere Application Server Version 6 without having to use a facility such as POI.

The Setup
A picture speaks a thousand words, so for the sake of brevity, here's a pictorial representation of what I'll be building. As Figure 1 shows, this article uses IBM WebSphere Application Server Version 6 for the J2EE application server.

Figure 1. Topological Overview: A Topological Overview of the Project Setup
Author's Note: The servlet code used in this article can be used with different application servers, but doing things such as setting up a data source will vary depending on which one you use. I'll leave it up to you to do the research to "port" the approach shown here to different application servers.

This application uses IBM Rational Application Developer Version 6, which I'll call Application Developer for the remainder of this article. Application Developer is an IDE with a built-in WebSphere Application Server Version 6 test environment. Consequently, you can test, develop, and deploy you entire application within Application Developer. You can download a trial version to test Application Developer for yourself.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date