Telstra has revealed the addition of almost one million new mobile services in the six months to December 2011, but Sensis revenues plummeted 24 percent in 12 months.
read more
David M Williams
Monday, 17 September 2007 11:48
include 'PHPExcel.php';
include 'PHPExcel/Writer/Excel2007.php';
$objPHPExcel = new PHPExcel();
$objPHPExcel->setActiveSheetIndex(0);
$objPHPExcel->getActiveSheet()->setCellValue('B1', 'Invoice');
$objPHPExcel->getActiveSheet()
->getStyle('B1')->getFont()->setName('Candara');
$objPHPExcel->getActiveSheet()->setCellValue('E4', '=C4*D4');
$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
$objWriter->save(‘invoice.xlsx’);
Producing Excel documents in PHP has never been easier.
Creating Word documents in pure Java
Continuing the trend, another team of developers have devised Java code which generates valid OpenXML word processing documents without any use of the Office client applications, or any Microsoft APIs or libraries, and indeed, without even requiring a Microsoft operating system.
The intention of this code is to assist developers who work in Java on Linux or Macintosh or any other non-Microsoft environment, and also developers building server-side applications that wish to produce Office-compatible documents to present data and reports.
Actually, to be precise, OpenXML covers a set of XML document standards; SpreadsheetML is the subset relating to spreadsheeting which PHPExcel is striving to implement, and this Java code actually implements the WordProcessingML side of OpenXML.
More coders have jumped in with Java snippets. Another sample shows creating a document, adjusting its properties and thumbnail, adding text and converting to HTML output. and several more can be found.
The pinnacle of them all, however, is OpenXML4J – an open-source library for Java developers that provides classes for OpenXML development. It’s in pure Java meaning it’s usable anywhere you have a standard Java compiler and library and runtime. Just like PHPExcel, this library can be used by developers to manage all the mechanics of OpenXML document construction and manipulation making working with Word/Excel and PowerPoint documents a breeze on any platform.
ODF to OpenXML and back again
Another project gaining traction is the ODF to OpenXML translator package. This title is potentially misleading; the project doesn’t just convert ODF (Open Document Format) documents to OpenXML but also allows conversion the other way. This is actually among the top 25 projects on SourceForge.
The development goals for this team are to make plugins that provide interoperability between applications based on ODF and OpenXML. A core deliverable is the development of add-ins for Microsoft Office which permit both opening and saving of ODF files. Unfortunately, no such add-ins appear to be underway or planned for OpenOffice but a secondary deliverable is a series of command-line translator utilities to perform batch conversions in either direction. These utilities can also be run on servers, invoked by server-side applications.

|
Microsoft Office 365Try an easy-to-use set of web-enabled tools for business-class productivity services. Office 365 provides anywhere-access to email, important documents, contacts, and calendars on almost any device. |