Nov 22

The Apache POI project helps you read and write Microsoft OLE2 and Office Open XML (OOXML) documents.

OLE2 includes Excel (XLS), Word (DOC) and Powerpoint (PPT) files.

Office Open XML Format is the new standards based XML file format found in Microsoft Office 2007 and 2008. This includes XLSX, DOCX and PPTX files.

Use POIFS to read OLE2 files

HSSF is used to read and write Excel (XLS) files.

XSSF is used to access OOXML Excel files (XLSX).

The combined SS interface (SS = HSSF + XSSF) is designed to allow you to access all Excel files (XLS and XLSX).

We shall be posting some POI examples in the next few weeks, let us know if there is anything specific you need.

written by objects \\ tags: , , , , , , , , , , ,

Sep 06

Leopard (10.5) was the first release of MacOS that included PHP 5 support. However by default it is disabled.
To enable it you need to uncomment (remove the #) from the following line in /private/etc/apache2/httpd.conf.

#LoadModule php5_module libexec/apache2/

Then restart apache

sudo /usr/sbin/apachectl restart

written by objects \\ tags: , ,

Oct 11

The DBUtil library from Apache provides a set of class for doing a variety of standard database tasks.

eg. To make a query becomes as simple as the following, providing the result set as a List of arrays where each list elements contains a row.

QueryRunner runner = new QueryRunner();
ArrayListHandler handler = new ArrayListHandler();
List<Object[]> result = runner.query(connection,
    "SELECT * FROM MyTable WHERE name=?", handler, "Joe Smith");

written by objects \\ tags: , , , ,