<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - Open XML made easier for Java developers with Apache POI</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Blogs/jccim/Open-XML-made-easier-for-Java-developers-with-Apache-POI/RSS"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 - Open XML made easier for Java developers with Apache POI</title>
		<link></link>
	</image>
	<description>
When developers are tasked to deal with document file formats it might be challenging to do the right thing if you don’t have a good experience with a particular format, and need to crack it open and understand all the details.
 
For Java developers and Microsoft Office file formats there’s a very interesting solution with the
Apache POI project, which provides a Java API to access Microsoft Office formats. Last year Microsoft and
Sourcesence 
announced that they would collaborate to add support of the Open XML file format to the Apache POI project, and the resulting Open XML support has been integrated as part of POI 3.5 beta 5.
 
The end result: Good news for Java developers who need to manipulate the Office Open XML files (.XLSX, .DOCX, .PPTX), because it really makes it easier for them to do the job! 
To illustrate the point, let me walk you through a demo scenario that uses Apache POI Java Libraries and actually combines it with the
PHPExcel project (for PHP developers) and the

Open XML Format SDK 2.0 (for .NET developers). My goal is just to give you a sense of the type of scenarios you can easily develop using multiple languages and multiple platforms. 
We will make that demo available with more explanation in an article on 
http://openxmldeveloper.org/. Before we get into the demo itself I want to thank
Julien Chable
and Maarten Balliauw for their help in building this demo. 
For now, let me walk you through the scenario. For the sake of our demonstration we are going to show how raw data can be consumed by a Java web application using the Apache POI, to create an .XLSX file from scratch. How that file can then be accessed and
 modified by a PHP application (with PHPExcel). And finally how the resulting file can be digitally signed and finalized via the .NET framework using the Open XML Format SDK.
 
Here’s the data flow: 

 
Step 1 of the scenario starts in the Java Web applications: 

 
Once the “Create Spreadsheet” button is pressed, it creates the files: 

 
And does some processing to inject the initial XML data and formatting. The result looks like this: 

 
Most of the Java code required to do this fits in this code snippet: 

 
Step 2, moving to the PHP application, the UI is similar: 

 
This step adds cell protection, renames the .XLSX file, changes cell formatting, and inserts additional content formatting. The result looks like this: 

 
And the code to accomplish it looks like this: 

 
Step 3, finally, from the ASP.NET web applications using the Open XML Format SDK: 

 
Where the code for adding the digital signature looks like this: 

 
Easy, don’t you think? 
Stay tuned, as I said earlier, we will follow up on 
http://openxmldeveloper.org/ with a more detailed article. 
Additional background on PHPExcel and the Open XML SDK: 
The PHPExcel project is an open source project available on 
Codeplex. It consists of a set of classes for PHP that enables PHP applications to read and write to various file formats. These formats include HTML, PDF, and the relevant one for our demonstration…Excel 2007’s .XLSX format. This class set supports features
 such as setting spreadsheet meta data (author, title, description ...), multiple worksheets, different fonts and font styles, cell borders, fills, gradients, and adding images to spreadsheets. In parallel to this project, there is also the sister project
PHPPowerPoint, which is intended to operate along similar lines as the PHPExcel application but with a focus on the .PPTX file formats. Both of these projects are built around the OpenXML
 standard, and the PHP framework. Read this nice article: 
Use PHP to create Open XML Spreadsheet reports 
The 
Open XML Format SDK provides methods for .NET developers to access and manipulate XML content, including XML data contained in OXML document formatted files. It provides strongly typed part classes to manipulate Open XML documents. The SDK also uses the
 .NET Framework Language-Integrated Query (LINQ) technology to provide strongly typed object access to the XML content inside the parts of Open XML documents. The April 2009 CTP release also adds support for the validation of Open XML documents.
Read Brian Jones&#39; blog to go deep on Open XML SDK.&amp;nbsp; 
Jean-Christophe Cimetiere&amp;nbsp; - Sr. Technical Evangelist  
</description>
	<link></link>
	<language>en</language>
	<pubDate>Sat, 25 May 2013 21:15:01 GMT</pubDate>
	<lastBuildDate>Sat, 25 May 2013 21:15:01 GMT</lastBuildDate>
	<generator>Rev9</generator>
</channel>
</rss>