<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!--*** This is a generated file. Do not edit. ***--> <link rel="stylesheet" href="../skin/tigris.css" type="text/css"> <link rel="stylesheet" href="../skin/mysite.css" type="text/css"> <link rel="stylesheet" href="../skin/site.css" type="text/css"> <link media="print" rel="stylesheet" href="../skin/print.css" type="text/css"> <title>HSSF and XSSF Examples</title> </head> <body bgcolor="white" class="composite"> <!--================= start Banner ==================--> <div id="banner"> <table width="100%" cellpadding="8" cellspacing="0" summary="banner" border="0"> <tbody> <tr> <!--================= start Group Logo ==================--> <td width="50%" align="left"> <div class="groupLogo"> <a href="http://poi.apache.org"><img border="0" class="logoImage" alt="Apache POI" src="../resources/images/group-logo.jpg"></a> </div> </td> <!--================= end Group Logo ==================--> <!--================= start Project Logo ==================--><td width="50%" align="right"> <div align="right" class="projectLogo"> <a href="http://poi.apache.org/"><img border="0" class="logoImage" alt="POI" src="../resources/images/project-logo.jpg"></a> </div> </td> <!--================= end Project Logo ==================--> </tr> </tbody> </table> </div> <!--================= end Banner ==================--> <!--================= start Main ==================--> <table width="100%" cellpadding="0" cellspacing="0" border="0" summary="nav" id="breadcrumbs"> <tbody> <!--================= start Status ==================--> <tr class="status"> <td> <!--================= start BreadCrumb ==================--><a href="http://www.apache.org/">Apache</a> | <a href="http://poi.apache.org/">POI</a><a href=""></a> <!--================= end BreadCrumb ==================--></td><td id="tabs"> <!--================= start Tabs ==================--> <div class="tab"> <span class="selectedTab"><a class="base-selected" href="../index.html">Home</a></span> | <script language="Javascript" type="text/javascript"> function printit() { if (window.print) { window.print() ; } else { var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH="0" HEIGHT="0" CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>'; document.body.insertAdjacentHTML('beforeEnd', WebBrowser); WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box WebBrowser1.outerHTML = ""; } } </script><script language="Javascript" type="text/javascript"> var NS = (navigator.appName == "Netscape"); var VERSION = parseInt(navigator.appVersion); if (VERSION > 3) { document.write(' <a title="PRINT this page OUT" href="javascript:printit()">PRINT</a>'); } </script> </div> <!--================= end Tabs ==================--> </td> </tr> </tbody> </table> <!--================= end Status ==================--> <table id="main" width="100%" cellpadding="8" cellspacing="0" summary="" border="0"> <tbody> <tr valign="top"> <!--================= start Menu ==================--> <td id="leftcol"> <div id="navcolumn"> <div class="menuBar"> <div class="menu"> <span class="menuLabel">Apache POI</span> <div class="menuItem"> <a href="../index.html">Top</a> </div> </div> <div class="menu"> <span class="menuLabel">HSSF+XSSF</span> <div class="menuItem"> <a href="index.html">Overview</a> </div> <div class="menuItem"> <a href="quick-guide.html">Quick Guide</a> </div> <div class="menuItem"> <a href="how-to.html">HOWTO</a> </div> <div class="menuItem"> <a href="converting.html">HSSF to SS Converting</a> </div> <div class="menuItem"> <a href="formula.html">Formula Support</a> </div> <div class="menuItem"> <a href="eval.html">Formula Evaluation</a> </div> <div class="menuItem"> <a href="eval-devguide.html">Eval Dev Guide</a> </div> <div class="menuItem"> <span class="menuSelected">Examples</span> </div> <div class="menuItem"> <a href="use-case.html">Use Case</a> </div> <div class="menuItem"> <a href="diagrams.html">Pictorial Docs</a> </div> <div class="menuItem"> <a href="limitations.html">Limitations</a> </div> <div class="menuItem"> <a href="user-defined-functions.html">User Defined Functions</a> </div> <div class="menuItem"> <a href="excelant.html">ExcelAnt Tests</a> </div> </div> <div class="menu"> <span class="menuLabel">Contributer's Guide</span> <div class="menuItem"> <a href="hacking-hssf.html">Hacking HSSF</a> </div> <div class="menuItem"> <a href="record-generator.html">Record Generator</a> </div> <div class="menuItem"> <a href="chart.html">Charts</a> </div> </div> </div> </div> <form target="_blank" action="http://www.google.com/search" method="get"> <table summary="search" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td nowrap="nowrap"> Search Apache POI<br> <input value="poi.apache.org" name="sitesearch" type="hidden"><input size="10" name="q" id="query" type="text"><img height="1" width="5" alt="" src="../skin/images/spacer.gif" class="spacer"><input name="Search" value="GO" type="submit"></td><td><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td colspan="3"><img height="7" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td> </tr> <tr> <td class="bottom-left-thick"></td><td bgcolor="#a5b6c6"><img height="1" width="1" alt="" src="../skin/images/spacer.gif" class="spacer"></td><td class="bottom-right-thick"></td> </tr> </table> </form> </td> <!--================= end Menu ==================--> <!--================= start Content ==================--><td> <div id="bodycol"> <div class="app"> <div align="center"> <h1>HSSF and XSSF Examples</h1> </div> <div class="h3"> <a name="HSSF+and+XSSF+examples"></a> <div class="h3"> <h3>HSSF and XSSF examples</h3> </div> <p>POI 3.5 and later comes with a number of examples that demonstrate how you can use POI API to create documents from "real life". The examples are based on common XSSF-HSSF interfaces so that you can generate either *.xls or *.xlsx output just by setting a command-line argument: </p> <pre class="code"> BusinessPlan -xls or BusinessPlan -xlsx </pre> <p>All sample source is available in <a href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/">SVN</a> </p> <a name="Business+Plan"></a> <div class="h3"> <h3>Business Plan</h3> </div> <p> The <a href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/BusinessPlan.java">BusinessPlan</a> application creates a sample business plan with three phases, weekly iterations and time highlighting. Demonstrates advanced cell formatting (number and date formats, alignmnets, fills, borders) and various settings for organizing data in a sheet (freezed panes, groupped rows). </p> <p> <img alt="business plan demo" src="../resources/images/businessplan.jpg"> </p> <a name="Calendar"></a> <div class="h3"> <h3>Calendar</h3> </div> <p> The <a href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/CalendarDemo.java">Calendar</a> demo creates a multi sheet calendar. Each month is on a separate sheet. </p> <p> <img alt="calendar demo" src="../resources/images/calendar.jpg"> </p> <a name="Loan+Calculator"></a> <div class="h3"> <h3>Loan Calculator</h3> </div> <p> The <a href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/LoanCalculator.java">LoanCalculator</a> demo creates a simple loan calculator. Demonstrates advance usage of cell formulas and named ranges. </p> <p> <img alt="loan calculator demo" src="../resources/images/loancalc.jpg"> </p> <a name="Timesheet"></a> <div class="h3"> <h3>Timesheet</h3> </div> <p> The <a href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/TimesheetDemo.java">Timesheet</a> demo creates a weekly timesheet with automatic calculation of total hours. Demonstrates advance usage of cell formulas. </p> <p> <img alt="timesheet demo" src="../resources/images/timesheet.jpg"> </p> <a name="Conditional+Formats"></a> <div class="h3"> <h3>Conditional Formats</h3> </div> <p> The <a href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/ConditionalFormats.java">ConditionalFormats</a> demo is a collection of short examples showing what you can do with Excel conditional formating in POI: </p> <ul> <li>Highlight cells based on their values</li> <li>Highlight a range of cells based on a formula</li> <li>Hide errors</li> <li>Hide the duplicate values</li> <li>Highlight duplicate entries in a column</li> <li>Highlight items that are in a list on the worksheet</li> <li>Highlight payments that are due in the next thirty days</li> <li>Shade alternating rows on the worksheet</li> <li>Shade bands of rows on the worksheet</li> </ul> <a name="ToHtml"></a> <div class="h3"> <h3>ToHtml</h3> </div> <p> The <a href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/html/ToHtml.java">ToHtml</a> example shows how to display a spreadsheet in HTML using the classes for spreadsheet display. </p> <a name="ToCSV"></a> <div class="h3"> <h3>ToCSV</h3> </div> <p> The <a href="http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/ss/examples/ToCSV.java">ToCSV</a> example demonstrates <em>one</em> way to convert an Excel spreadsheet into a CSV file. </p> <div id="authors" align="right">by Yegor Kozlov</div> </div> </div> </div> </td> <!--================= end Content ==================--> </tr> </tbody> </table> <!--================= end Main ==================--> <!--================= start Footer ==================--> <div id="footer"> <table summary="footer" cellspacing="0" cellpadding="4" width="100%" border="0"> <tbody> <tr> <!--================= start Copyright ==================--> <td colspan="2"> <div align="center"> <div class="copyright"> Copyright © 2002-2012 The Apache Software Foundation. All rights reserved.<br> Apache POI, POI, Apache, the Apache feather logo, and the Apache POI project logo are trademarks of The Apache Software Foundation. </div> </div> </td> <!--================= end Copyright ==================--> </tr> <tr> <td align="left"> <!--================= start Host ==================--> <!--================= end Host ==================--></td><td align="right"> <!--================= start Credits ==================--> <div align="right"> <div class="credit"></div> </div> <!--================= end Credits ==================--> </td> </tr> </tbody> </table> </div> <!--================= end Footer ==================--> </body> </html>