CFUNITED – The premier ColdFusion conference www.cfunited.com Another Look at Microsoft Office Using Apache Jakarta POI Jeremy Lund June 28th, 2006.

Slides:



Advertisements
Similar presentations
Introduction to the BinX Library eDIKT project team Ted Wen Robert Carroll
Advertisements

Sue Wills July Objects The JavaScript language is completely centered around objects, and because of this, it is known as an Object Oriented Programming.
Alternative FILE formats
Web Design with Cascading Style Sheet Lan Vu. Overview Introduction to CSS Designing CSS Using Visual Studio to create CSS Using template for web design.
Rick Root.  It just doesn’t seem right to have a slide with bullet points that prompt me to talk about myself.
Working with Microsoft Excel spreadsheets and Microsoft Access databases in a Java application Sean Sullivan July 27, 2006.
Create a table Resize, split and merge cells Insert and align graphics within table cells Insert text and format cell content Maintain Web site Working.
Excel 2007 ® Business and Personal Finances How can Excel 2007 help you format a workbook?
Lab#1 (14/3/1431h) Introduction To java programming cs425
Chapter 3 - Java Programming With Supplied Classes1 Chapter 3 Java Programming With Supplied Classes.
1 Computing for Todays Lecture 22 Yumei Huo Fall 2006.
Converting word, excel, and powerpoint into html docs Michael Roy Information Technology Services Wesleyan University
Meaningful Use (MU) Cancer Registry Report Validation Tool Quick Guide Andrew McCaffrey National Institute of Standards and Technology November 29 th,
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft PowerPoint 2002 Working with External.
Converting General Microsoft Word Questionnaires to DDI.
1 ADVANCED MICROSOFT WORD Lesson 15 – Creating Forms and Working with Web Documents Microsoft Office 2003: Advanced.
Platforms for Learning in Computer Science July 28, 2005.
Apache POI for Content Management
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
Serving Word September 18, 2002Samuel R. Neff Serving Word Using HTML, XML, and CSS to Dynamically Generate Word Documents Samuel R. Neff B-Line Express.
Chapter 5 of Computers: Understanding Technology
Avro Apache Course: Distributed class Student ID: AM Name: Azzaya Galbazar
Announcements  If you need more review of Java…  I have lots of good resources – talk to me  Use “Additional Help” link on webpage  Weekly assignments.
HTML HTML stands for "Hyper Text Mark-up Language“. Technically, HTML is not a programming language, but rather a markup language. Used to create web pages.
Web Technologies Website Development Trade & Industrial Education
Using Excel Session 2 Dr. Gary Briers Texas A&M University.
Introduction to Programming Writing Java Beginning Java Programs.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
IST 210: PHP BASICS IST 210: Organization of Data IST210 1.
By: Jessica Carico – Kara Holbrook – Laura Watkins.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
HTML CSS JAVASCRIPT. HTML - Stands for Hyper Text Markup Language HTML is a ‘language’ that describes web pages. This language is a collection of codes.
With Microsoft Office 2007 Intermediate© 2008 Pearson Prentice Hall1 PowerPoint Presentation to Accompany GO! with Microsoft ® Office 2007 Intermediate.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
The netCDF-4 data model and format Russ Rew, UCAR Unidata NetCDF Workshop 25 October 2012.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
Lists and the Collection Interface Chapter 4. 2 The List Interface and ArrayList Class So far, all we have is an array for storing a collection of elements.
1 Document management with the OpenOffice.org API.
Apache Jakarta Project. What is Jakarta’s mission Jakarta is a Project of the Apache Software Foundation, charged with the creation and maintenance of.
Introduction to Programming Writing Java Beginning Java Programs.
Field Trip #22 Creating an Excel Spreadsheet with Java By Keith Lynn.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
COP INTERMEDIATE JAVA Designing Classes. Class Template or blueprint for creating objects. Their definition includes the list of properties (fields)
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
POI-HSLF Java API To Access Microsoft PowerPoint Format Files Yegor Kozlov yegor - apache - org.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
Java Doc Guideline R.SANTHANA GOPALAN. Java Doc Guideline Audience Internal Developers PQA - who write test plans PPT – who write the documentation Customers.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Types and Interfaces COMP.
©2001 Priority Technologies, Inc. All Rights Reserved Meteor Status Miami Face to Face Meeting January 16 – 18, 2002.
1 Preparation for site Create a folder in MyDocuments: beavercheese. Create a subfolder, images Classes, career, DW beginner Download.
Apache POI Dima Ionut Daniel.
SourceAnatomy1 Java Source Anatomy Barb Ericson Georgia Institute of Technology July 2008.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
1 Sections 5.1 – 5.2 Digital Image Processing Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
1 Word Processing Intermediate Using Microsoft Office 2000.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Made with OpenOffice.org 1 Beyond the Single Page Steve Oualline OpenOffice Writer.
1 Workshop - ODFDOM Lars Behrmann Frank Meies Svante Schubert Sun Microsystems, Hamburg 1.
A Workshop on LibreOffice Er. Arvind Kumar Assistant Professor, Department of Computer Science & Engineering
Microsoft Powerpoint Tools and Tips Created by William Yearling
ODF API - ODFDOM Svante Schubert Software Engineer
Converting word, excel, and powerpoint into html docs
TOPICS Chrome Dev Tools Process for Building a Static Website
PHP.
Microsoft PowerPoint 2007 – Unit 2
Tutorial 10: Programming with javascript
Microsoft Excel Done by : Suaad Mohamed.
Presentation transcript:

CFUNITED – The premier ColdFusion conference Another Look at Microsoft Office Using Apache Jakarta POI Jeremy Lund June 28th, 2006

About Me  Manager of the Web Resource Center University Health Care (Salt Lake City, Utah)  Sun Certified Java Programmer for the Java 2 platform  B.S., Computer Engineering from University of Utah

Goals  What is POI?  How do I install POI?  What benefits do I get from using POI?  What won't it do?  POI alternatives  Java tips  Lots of code examples

What is POI?

What is Apache Jakarta POI?  Poor Obfuscation Implementation  A set of APIs for interacting with OLE 2 Compound Document Format files Examples: Word (.doc), Excel (.xls), and PowerPoint (.ppt)

Why Use POI? Data Import/Export

Why Use POI? Content Management

Why Use POI? Reporting

In an Ideal World...

In the Real World...

What other tools?  Save as XML  Save as HTML  COM  OpenOffice.org 2.0 POI is just one more tool

Anatomy of an OLE2CDF File

POIFS: At the Core  POI file system (POIFS) is used to read and manipulate OLE2CDF files Package: org.apache.poi.poifs.filesystem  Two types of stream entries supported: DirectoryEntry DocumentEntry

POIFS Examples  Example: POIFSExample1.cfm  Example: POIFSExample2.cfm

How Do I Get to the Data?  APIs to interact with specific document types and streams  XLS files (HSSF)  PPT files (HSLF) 3.0 alpha  DOC files (HWPF) scratchpad  Document props (HPSF) (read-only)  final ships with CF 7  I am using 3.0 alpha for this presentation

How to Install  For release:  For 3.0 alpha:  Scratchpad is not included with CF 7  Stop CF services  Save in {cfwebroot}/WEB-INF/lib  Restart CF services

Quick Java-CF Review  To use Java classes: createObject() – loads the class  createObject(“java”,”fully.qualified.name”)  Can use for static method calls obj.init() - creates an instance of the class using the specified constructor

Java Tip #1  Know your casting tools!

Java Tip #1  Casting tools javaCast(type,cfVar)  boolean, int, long, float, double, string, null  Null only available in 7 Primitive wrapper classes  Array reflection classes  java.lang.reflect.Array  Call newInstance(class,int length)

Java Tip #2  Java reflection is your friend!

Java Tip #2  obj.getClass() gives you a reference to the class String value of name: obj.getClass().getName() Wrapper classes have a TYPE static variable to represent primitives.

org.apache.poi.hssf.usermodel  Interface for reading and writing XLS files.  Mature and reliable  Basic class structure is similar to HTML table HSSFSheet = table HSSFRow = tr HSSFCell = td  Example: HSSFExample1.cfm

Add some style to the spreadsheet  HSSFCellStyle,HSSFFont  Can modify: Fonts (size and style) Colors Background Fills Borders Widths and heights  Example: HSSFExample2.cfm

Reading Spreadsheets  Similar to writing spreadsheets  Requires more care with datatypes!  Null  Example: HSSFExample3.cfm

org.apache.poi.hwpf  Interface for reading and writing Word (DOC) files.  In the scratchpad section of the library.  Has worked for what I have used it for (reading files), which is all I will talk about today.

Structure of a Word Document

HWPF Example 1  Example: HWPFExample1.cfm

HWPF Example 2  More meaningful text  Examples: HWPFExample2.cfm basicDocumentFacade.cfc

HWPF Example 3  Lists, Style  Examples: HWPFExample3.cfm advancedDocumentFacade.cfc

org.apache.poi.org.apache.poi.hslf  Interface for reading and writing PowerPoint (PPT) files.  Early, but very active development

HSLF Example 1  Simple Slideshow parser  Example: HSLFExample1.cfm

HSLF Example 2  Improved Slideshow parser XSLT  Example: HSLFExample2.cfm slideShowExtractor.cfc

Limitations  Available documentation  Images  Development activity

Resources    google “jakarta poi”

Thank you Jeremy Lund