O'Reilly logo

Excel Hacks by Raina Hawley, David Hawley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #100. Create Excel Spreadsheets Using Other Environments

Although Excel and other spreadsheet programs are the traditional interfaces for creating and reading spreadsheets, sometimes you might need to create .xls files directly from other programs.

Whether you're creating Excel files from databases on an Apache server or you just want to present the information stored in a Java program to Excel users, there are a variety of packages out there that will enable you to create and access .xls files without actually using Excel. Although these packages are frequently more difficult to use than the SpreadsheetML described in [Hack #96] and [Hack #97], they generally produce files readable by any version of Excel since Excel 97 (including Macintosh versions of Excel), and often support more Excel features as well.

Some of the more popular (free) packages for working with Excel data include the following:

Spreadsheet::WriteExcel

A Perl package for creating Excel documents, available at http://search.cpan.org/dist/Spreadsheet-WriteExcel/

Spreadsheet::ParseExcel

A toolkit that enables Perl programs to read Excel files, available at http://search.cpan.org/~kwitknr/Spreadsheet-ParseExcel-0.2602/

Jakarta POI

A product of the Apache Project that provides both read and write access to Excel spreadsheets through a Java API, available at http://jakarta.apache.org/poi/index.html

JExcelApi

A Java API for reading and writing Excel spreadsheets that includes Excel-to-CSV and Excel-to-XML converters, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required