tag:blogger.com,1999:blog-28621232527548647082024-02-06T20:43:13.190-08:00Introduction to Apache POI - 1Ravalihttp://www.blogger.com/profile/13836884142229867271noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-2862123252754864708.post-76426996414128136052019-01-21T04:36:00.001-08:002019-01-21T23:52:57.300-08:00Introduction to Apache POI - 2<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 14.0pt; line-height: 107%;">Introduction to Apache POI - 2<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">In the previous post we have seen how to create a workbook, now let’s
see, how to add text, apply styles, formula, formats…<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Creating My
first Workbook….<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">XSSFWorkbook workbook = <span style="mso-bidi-font-weight: bold;">new</span> XSSFWorkbook (); </span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #5b9bd5; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">// Creating a XSSFWorkbook<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">Sheet sheet = workbook. createSheet("My
First Excel"); </span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #5b9bd5; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">// You can give a
name to sheet<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">Row row = sheet.createRow(0); </span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #5b9bd5; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">//creating a row<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><span style="mso-tab-count: 2;"> </span><o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">Font font = workbook.createFont(); </span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #5b9bd5; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">//creating a font for data<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">font.setBold(<span style="mso-bidi-font-weight: bold;">true</span>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">font.setFontHeightInPoints((<span style="mso-bidi-font-weight: bold;">short</span>) 20);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">font.setColor(IndexedColors.<i><span style="mso-bidi-font-weight: bold;">WHITE</span></i>.getIndex());<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">font.setFontName(ApiConstants.<i><span style="mso-bidi-font-weight: bold;">CENTURY_FONT</span></i>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">font.setItalic(<span style="mso-bidi-font-weight: bold;">false</span>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">CellStyle style = workbook.createCellStyle();
</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #5b9bd5; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">//creating a new style </span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">style.setFillBackgroundColor(IndexedColors.<i><span style="mso-bidi-font-weight: bold;">GREY_50_PERCENT</span></i>.getIndex());<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">style.setFillPattern(FillPatternType.<i><span style="mso-bidi-font-weight: bold;">SOLID_FOREGROUND</span></i>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">style.setFont(font);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><span style="mso-tab-count: 2;"> </span><o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">row.createCell(0).setCellStyle(style); </span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #5b9bd5; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">//set created style to the cell<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">row.getCell(0).setCellValue("Hi!!"); </span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #5b9bd5; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">//set value to cell<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLg5UrZS5Q-kTmLwUWlX-7RV0Ve0qEGCImA1bUvX8yuU9HmhsgT1yaoSaQm65cjXkQxby4EA7exKbdnWkJAAnwYVbJAJp3oHmWiCCpS60Na7JfJiOn0XygbNtlnNKBiIwRqKCRF2MNRX7H/s1600/1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="393" data-original-width="632" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLg5UrZS5Q-kTmLwUWlX-7RV0Ve0qEGCImA1bUvX8yuU9HmhsgT1yaoSaQm65cjXkQxby4EA7exKbdnWkJAAnwYVbJAJp3oHmWiCCpS60Na7JfJiOn0XygbNtlnNKBiIwRqKCRF2MNRX7H/s400/1.png" width="400" /></a></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><!--[if gte vml 1]><v:shapetype id="_x0000_t75"
coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="Picture_x0020_2" o:spid="_x0000_i1029" type="#_x0000_t75"
style='width:468pt;height:235.5pt;visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/ravalin/AppData/Local/Temp/msohtmlclip1/01/clip_image001.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">We can set type of data that is in cell i.e. the value of the cell
is of numeric or currency or date type, so on. <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Example:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-tab-count: 1;"> </span></span><b style="mso-bidi-font-weight: normal;"><span style="background: #e8f2fe; color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">row.getCell(0).setCellType(CellType.<i><span style="mso-bidi-font-weight: bold;">NUMERIC</span></i>);</span></b><b style="mso-bidi-font-weight: normal;"><span style="background: #e8f2fe; color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">we can also set the type of format using the style,<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-tab-count: 1;"> </span></span><b style="mso-bidi-font-weight: normal;"><span style="background: #e8f2fe; color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">style.setDataFormat((<span style="mso-bidi-font-weight: bold;">short</span>) 0x2c);</span></b><b style="mso-bidi-font-weight: normal;"><span style="background: #e8f2fe; color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"> </span></b><b style="mso-bidi-font-weight: normal;"><span style="background: #e8f2fe; color: #5b9bd5; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">//accounting
format<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">We can almost imitate all the functionalities of an excel using
Apache POI<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmGHkKxIMgGBfCKC-oIkXaQv8LZYbpBy3KzCYwWOCXBfTLI9PteupGuQdwIib63LuvqJ59oSqm2qYaDHbhS5PS8GSmL_Au_Dnq_6p2Yg0q-tGzatbHzQexyiBIYqVFfTXr6PWBDKjavCD0/s1600/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="352" data-original-width="649" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmGHkKxIMgGBfCKC-oIkXaQv8LZYbpBy3KzCYwWOCXBfTLI9PteupGuQdwIib63LuvqJ59oSqm2qYaDHbhS5PS8GSmL_Au_Dnq_6p2Yg0q-tGzatbHzQexyiBIYqVFfTXr6PWBDKjavCD0/s400/2.png" width="400" /></a></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><!--[if gte vml 1]><v:shape id="Picture_x0020_3"
o:spid="_x0000_i1028" type="#_x0000_t75" style='width:468pt;height:283.5pt;
visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/ravalin/AppData/Local/Temp/msohtmlclip1/01/clip_image003.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><b style="mso-bidi-font-weight: normal;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Merged Cell:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">Apache POI allows us to merge cells into a single cell. To do
so, it provides methods which takes cell indexes as argument and merge the
cells into a single large cell.</span><b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"> <o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="background: white; color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #767171; font-family: "calibri light" , sans-serif;"><o:p> </o:p></span></b><b style="text-indent: 0.5in;"><span style="color: #767171; font-family: "calibri light" , sans-serif;">Row row1 = sheet.createRow(1); //creating a
row</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="text-indent: 0.5in;"><span style="color: #767171; font-family: "calibri light" , sans-serif;"> row1.createCell(0).setCellValue("Merged
Cells.............!");</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif;"><span style="mso-tab-count: 1;"> </span>row1.getCell(0).setCellStyle(style);</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #767171; font-family: "calibri light" , sans-serif;"> CellRangeAddress mergedCellRange = new CellRangeAddress(1, 1, 0,3); //adding </span></b><b style="text-align: right;"><span style="color: #767171; font-family: "calibri light" , sans-serif;">merged range</span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; line-height: 107%;"> sheet.addMergedRegion(mergedCellRange);<span style="font-size: 12pt;"><o:p></o:p></span></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><br /></span></b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzjtZRYIqZIAL3_wwrAggtENoVnZ_AB5-00kTHLMNz_ZDWmNQ3LCfrM4H0xjFO2NG4TJWpZIzzvYHCRNhLRRG9Y20ENagxzyNOH0L80mVmaDEtAyVnonfDv70KzKy8jFsHQ_05pJjWKSjb/s1600/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="397" data-original-width="630" height="251" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzjtZRYIqZIAL3_wwrAggtENoVnZ_AB5-00kTHLMNz_ZDWmNQ3LCfrM4H0xjFO2NG4TJWpZIzzvYHCRNhLRRG9Y20ENagxzyNOH0L80mVmaDEtAyVnonfDv70KzKy8jFsHQ_05pJjWKSjb/s400/3.png" width="400" /></a></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><!--[if gte vml 1]><v:shape id="Picture_x0020_4"
o:spid="_x0000_i1027" type="#_x0000_t75" style='width:468pt;height:275.25pt;
visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/ravalin/AppData/Local/Temp/msohtmlclip1/01/clip_image005.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Hiding Rows:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">It is possible to hide a row
using Apache POI, all we need to is set height of the row to zero,<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<b style="mso-bidi-font-weight: normal;"><span style="background: #e8f2fe; color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">row.setZeroHeight(<span style="mso-bidi-font-weight: bold;">true</span>);</span></b><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><!--[if gte vml 1]><v:shape id="Picture_x0020_1"
o:spid="_x0000_i1026" type="#_x0000_t75" style='width:468pt;height:262.5pt;
visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/ravalin/AppData/Local/Temp/msohtmlclip1/01/clip_image007.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--><span style="color: #767171; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;"><o:p></o:p></span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU2dZ0OUi8EO6Ugd-AexY1zwUWCZxtzUg0tl6BeZUwVcRa2o8HN6Uj2y5yNviEMtjNw9jdJC1F2WWPGGPqEgcXRIM9BBd3UbxqPf1euO7XuVKtnjsgkaw9Gyw2PlfAKTgYEENFl96dQVmA/s1600/5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="350" data-original-width="624" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjU2dZ0OUi8EO6Ugd-AexY1zwUWCZxtzUg0tl6BeZUwVcRa2o8HN6Uj2y5yNviEMtjNw9jdJC1F2WWPGGPqEgcXRIM9BBd3UbxqPf1euO7XuVKtnjsgkaw9Gyw2PlfAKTgYEENFl96dQVmA/s400/5.png" width="400" /></a></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">In the Image, we
can use that row 1 is not seen…<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Formula</span></b><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">We can set formulas for a cell using Apache POI,<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">XSSFWorkbook <u>workbook</u> = <u><span style="mso-bidi-font-weight: bold;">new</span> XSSFWorkbook()</u>; <o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">Sheet sheet = workbook.createSheet("My First Excel"); <o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">Font font = workbook.createFont();font.setBold(<span style="mso-bidi-font-weight: bold;">true</span>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">font.setFontHeightInPoints((<span style="mso-bidi-font-weight: bold;">short</span>)
13);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">font.setColor(IndexedColors.<i><span style="mso-bidi-font-weight: bold;">WHITE</span></i>.getIndex());<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">font.setFontName(ApiConstants.<i><span style="mso-bidi-font-weight: bold;">CENTURY_FONT</span></i>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">font.setItalic(<span style="mso-bidi-font-weight: bold;">false</span>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">CellStyle style = workbook.createCellStyle();<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">style.setFillBackgroundColor(IndexedColors.<i><span style="mso-bidi-font-weight: bold;">GREY_50_PERCENT</span></i>.getIndex());<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">style.setFillPattern(FillPatternType.<i><span style="mso-bidi-font-weight: bold;">SOLID_FOREGROUND</span></i>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">style.setFont(font);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">style.setDataFormat((<span style="mso-bidi-font-weight: bold;">short</span>)0x2c);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;"><span style="mso-tab-count: 2;"> </span><o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">Font textFont = workbook.createFont();<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">textFont.setBold(<span style="mso-bidi-font-weight: bold;">true</span>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">textFont.setFontHeightInPoints((<span style="mso-bidi-font-weight: bold;">short</span>)
13);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">textFont.setColor(IndexedColors.<i><span style="mso-bidi-font-weight: bold;">BLUE</span></i>.getIndex());<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">textFont.setFontName(ApiConstants.<i><span style="mso-bidi-font-weight: bold;">CENTURY_FONT</span></i>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">textFont.setItalic(<span style="mso-bidi-font-weight: bold;">true</span>);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">CellStyle textStyle = workbook.createCellStyle(); // creating a new
style<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">textStyle.setFont(textFont);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">Row row = sheet.createRow(0); <o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">row.createCell(0).setCellStyle(textStyle);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">row.getCell(0).setCellValue("Creating Formula");<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;"><span style="mso-tab-count: 2;"> </span><o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">Row row1 = sheet.createRow(1); <o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">row1.createCell(0).setCellStyle(style);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">row1.getCell(0).setCellValue(1000);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;"><span style="mso-tab-count: 2;"> </span><o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">Row row2 = sheet.createRow(2); <o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">row2.createCell(0).setCellStyle(style);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">row2.getCell(0).setCellValue(2000);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;"><span style="mso-tab-count: 2;"> </span><o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">Row formulaRow = sheet.createRow(3); <o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">formulaRow.createCell(0).setCellStyle(style);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="background: #e8f2fe; color: #767171; font-family: "calibri light" , sans-serif;">formulaRow.getCell(0).setCellType(CellType.</span></b><b><i><span style="background: #d4d4d4; color: #767171; font-family: "calibri light" , sans-serif;">FORMULA</span></i></b><b style="mso-bidi-font-weight: normal;"><span style="background: #e8f2fe; color: #767171; font-family: "calibri light" , sans-serif;">);</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;"> formulaRow.getCell(0).setCellFormula("SUM(A2+A3)");<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">try</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;"> (OutputStream fileOut = <span style="mso-bidi-font-weight: bold;">new</span>
FileOutputStream("C:/Export/workbook.xlsx")) {<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;"><span style="mso-tab-count: 1;"> </span>workbook.write(fileOut);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-language: AR-SA; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-style-textfill-fill-alpha: 100.0%; mso-style-textfill-fill-color: #767171; mso-style-textfill-fill-colortransforms: lumm=50000; mso-style-textfill-fill-themecolor: background2; mso-themecolor: background2; mso-themeshade: 128;">}<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggijTnIYe6MxA9MkIoMSWicYYDGknu0yr6zE6ZNBOgqJR0LR96Og6KYPXWrWIp9Soq7IBr5rbCUoPvjWJ6rPgjZHIK7h2UsT8HHyRTuT4Sxr4vGM36thGHx4YyGBxV9ruoN_M6sK_l5VUO/s1600/4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="393" data-original-width="631" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggijTnIYe6MxA9MkIoMSWicYYDGknu0yr6zE6ZNBOgqJR0LR96Og6KYPXWrWIp9Soq7IBr5rbCUoPvjWJ6rPgjZHIK7h2UsT8HHyRTuT4Sxr4vGM36thGHx4YyGBxV9ruoN_M6sK_l5VUO/s400/4.png" width="400" /></a></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="mso-no-proof: yes;"><!--[if gte vml 1]><v:shape id="Picture_x0020_6"
o:spid="_x0000_i1025" type="#_x0000_t75" style='width:468pt;height:294.75pt;
visibility:visible;mso-wrap-style:square'>
<v:imagedata src="file:///C:/Users/ravalin/AppData/Local/Temp/msohtmlclip1/01/clip_image009.png"
o:title=""/>
</v:shape><![endif]--><!--[if !vml]--><!--[endif]--></span><b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Fit Sheet to One Page:<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">These two properties allows us to
fit the data of excel sheet into one single page.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none; text-indent: .5in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">sheet.getPrintSetup().setFitWidth((<span style="mso-bidi-font-weight: bold;">short</span>) 1);<o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">sheet.getPrintSetup().setFitHeight((<span style="mso-bidi-font-weight: bold;">short</span>)1);</span></b><b style="mso-bidi-font-weight: normal;"><span style="color: #767171; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">References:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span class="MsoHyperlink"><b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><a href="https://poi.apache.org/components/">https://poi.apache.org/components/</a></span></b></span><b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal">
<span class="MsoHyperlink"><b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><a href="https://poi.apache.org/apidocs/4.0/">https://poi.apache.org/apidocs/4.0/</a></span></b></span><b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<br /></div>
Ravalihttp://www.blogger.com/profile/13836884142229867271noreply@blogger.com0tag:blogger.com,1999:blog-2862123252754864708.post-84525709032974780412019-01-18T01:36:00.001-08:002019-01-18T01:42:07.857-08:00Introduction to Apache POI - 1<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 14.0pt; line-height: 107%;">Introduction to Apache POI - 1<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Many times it is required to
generate reports for an application or an application can receive data in excel
files. In such situations, it required to either read or write to excel files. <o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">There are many software which help
you achieve it such as Apache POI, GrapeCity, Aspose Cells, JExcel, JXL …<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Apache POI developed by Apache
Software Foundation, is an open sourced library used by many Java developers as
it provides easy way to design, modify Office files. It helps you almost
imitate your original Office files.<o:p></o:p></span></div>
<div class="MsoNormal">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Components of
Apache POI:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Commonly used and supported file
formats:</span><br />
<br />
<ul style="text-align: left;">
<li>HSSF : excel
files (.xls)<span style="font-family: "symbol"; font-size: 12pt; line-height: 107%; text-indent: -0.25in;"><span style="mso-list: Ignore;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"> </span></span></span></li>
<li><span style="font-family: "calibri light" , sans-serif; font-size: 12pt; line-height: 107%; text-indent: -0.25in;">HSLF : <span style="mso-tab-count: 1;"> </span>power point (.ppt)</span></li>
<li><span style="font-family: "calibri light", sans-serif; font-size: 12pt; text-indent: -0.25in;">HWPF : word
documents (.doc)</span></li>
<li><span style="font-family: "calibri light", sans-serif; font-size: 12pt; text-indent: -0.25in;">XSSF : excel
files(.xlsx)</span></li>
</ul>
</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Excel files
formats:</span></b></div>
<div class="MsoNormal">
<ul style="text-align: left;">
<li><span style="font-family: "calibri light" , sans-serif; font-size: 12pt; line-height: 107%;">There are two major formats </span><span style="font-family: "calibri light" , sans-serif; font-size: 12pt; text-indent: -0.25in;">Excel 93-2003
workbook- it follows binary file format of .xls extension</span></li>
<li>Excel 2007+ -
it follows XML based file format of .xlsx extension</li>
</ul>
</div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Apache POI has options to format
both file formats. HSSF can be used for excel 93-2003 workbooks. XSSF can be
used for excel 2007+ workbooks.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Apache POI provided us with
another streaming API SXSSF which helps us work with vert large spreadsheets
while using very less memory.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">The following table synopsizes the
comparative features of POI’s spreadsheet API:<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHTU2TMhzaZdOw9BZipenIY0MtjrpeK3t_Hj1jwhA7Jf26a_4iS2hVqCIuzoS2X7tTmgjcpQ2nGxoznSj6MAZ295GD3E04KtbsurpBxySpMzE61BouXTz3SiTngXvezMoYNe4aQLPWBMlT/s1600/ink.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="260" data-original-width="577" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHTU2TMhzaZdOw9BZipenIY0MtjrpeK3t_Hj1jwhA7Jf26a_4iS2hVqCIuzoS2X7tTmgjcpQ2nGxoznSj6MAZ295GD3E04KtbsurpBxySpMzE61BouXTz3SiTngXvezMoYNe4aQLPWBMlT/s1600/ink.png" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Working with
Workbooks</span></b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">:<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Maven dependency:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><!--
https://mvnrepository.com/artifact/org.apache.poi/poi --><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><dependency><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><span style="mso-spacerun: yes;">
</span><groupId>org.apache.poi</groupId><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><span style="mso-spacerun: yes;">
</span><artifactId>poi</artifactId><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><span style="mso-spacerun: yes;">
</span><version>4.0.1</version><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"></dependency><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
--><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><dependency><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><span style="mso-spacerun: yes;">
</span><groupId>org.apache.poi</groupId><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><span style="mso-spacerun: yes;">
</span><artifactId>poi-ooxml</artifactId><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"><span style="mso-spacerun: yes;">
</span><version>4.0.1</version><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="color: #7b7b7b; font-family: "calibri light" , sans-serif; mso-ascii-theme-font: major-latin; mso-bidi-theme-font: major-latin; mso-hansi-theme-font: major-latin; mso-themecolor: accent3; mso-themeshade: 191;"></dependency><o:p></o:p></span></b></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-spacerun: yes;"> </span>If you are not using maven,
then you need to add the following jars:<o:p></o:p></span></div>
<ul type="disc">
<li class="MsoNormal" style="background: white; color: #222635; line-height: normal; mso-list: l2 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">poi-3.17.jar<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #222635; line-height: normal; mso-list: l2 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">poi-ooxml-3.17.jar<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #222635; line-height: normal; mso-list: l2 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">poi-ooxml-schemas-3.17.jar<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #222635; line-height: normal; mso-list: l2 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">curvesapi-1.04.jar<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #222635; line-height: normal; mso-list: l2 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">xmlbeans-2.6.0.jar<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #222635; line-height: normal; mso-list: l2 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">commons-codec-1.10.jar<o:p></o:p></span></li>
<li class="MsoNormal" style="background: white; color: #222635; line-height: normal; mso-list: l2 level1 lfo3; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">commons-collections4-4.1.jar<o:p></o:p></span></li>
</ul>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">When you start using excel, you hear common words like workbook,
sheet, row, cell, formula…<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">The same has been implemented in Apache POI.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Workbook</span></b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">: It is the
high level representation of a excel workbook. User create this object to read
or write a workbook. HSSFWorkbook and XSSFWorkbook class implement this class
to read or write compatible formats.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoListParagraph" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-add-space: auto; mso-list: l0 level1 lfo4; text-indent: -.25in;">
<span style="font-family: "wingdings"; font-size: 12.0pt; line-height: 107%;"><span style="mso-list: Ignore;"><span style="font: 7.0pt "Times New Roman";"> </span></span></span><!--[endif]--><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Creating a Workbook:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Workbook wb = new HSSFWorkbook ();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Workbook wb = new XSSFWorkbook ();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "wingdings"; line-height: 107%; text-indent: -0.25in;"><span style="mso-list: Ignore;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"><br /></span></span></span>
<span style="font-family: "wingdings"; line-height: 107%; text-indent: -0.25in;"><span style="mso-list: Ignore;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"><br /></span></span></span>
<span style="font-family: "wingdings"; line-height: 107%; text-indent: -0.25in;"><span style="mso-list: Ignore;"><span style="font-family: "times new roman"; font-size: 7pt; font-stretch: normal; line-height: normal;"> </span></span></span><span style="font-family: "calibri light" , sans-serif; font-size: 12pt; line-height: 107%; text-indent: -0.25in;">Copying one Workbook to another:</span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-add-space: auto;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"> Workbook wb =
new HSSFWorkbook ();<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin-bottom: 0in; mso-add-space: auto;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"> …<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: black; font-family: "courier new"; font-size: 9.5pt;"><span style="mso-tab-count: 1;"> </span></span><span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">try<span style="mso-spacerun: yes;"> </span>(OutputStream fileOut = new
FileOutputStream("workbook.xls")) {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span>wb.write(fileOut);<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-spacerun: yes;"> </span>Workbook wb = new
XSSFWorkbook ();<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><span style="mso-spacerun: yes;"> </span>try<span style="mso-spacerun: yes;"> </span>(OutputStream fileOut = new
FileOutputStream("workbook.xls")) {<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span>wb.write(fileOut);<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="color: black; font-family: "calibri light" , sans-serif; font-size: 12.0pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-tab-count: 1;"> </span><span style="mso-spacerun: yes;"> </span>}<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">Sheet</span></b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">: It is the high level representation for worksheet. Sheets are
the central structures of a workbook where user does most of his spreadsheet
work.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt;">Creating a new Sheet in a workbook:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Workbook wb = new XSSFWorkbook ();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">wb.createSheet(String sheetname);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Get existing sheet in a workbook:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-tab-count: 1;"> </span>Workbook wb = new
XSSFWorkbook (file name);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-tab-count: 1;"> </span>wb.getSheet(string
sheetname);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Row</span></b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">: High level
representation of a row in spreadsheet.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-tab-count: 1;"> </span>Creating a new
row:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Row row=sheet.createRow(int rownum);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Getting a created row:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in; text-indent: .5in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Row row=sheet.getRow(int rownum);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Cell</span></b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">:<span style="mso-spacerun: yes;"> </span></span><span style="background: white; color: #474747; font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">High level representation of a cell in a row of a
spreadsheet.</span><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="color: #474747; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">Cells can be numeric, formula-based or string-based (text). The
cell type specifies this. String cells cannot contain numbers and numeric cells
cannot contain strings (at least according to our model). Client apps should do
the conversions themselves. Formula cells have the formula string, as well as
the formula result, which can be numeric or string.<o:p></o:p></span></div>
<div class="MsoNormal" style="background: white; line-height: normal; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="color: #474747; font-family: "calibri light" , sans-serif; font-size: 12.0pt;">Cells should have their number (0 based) before being added to a
row</span><span style="color: #474747; font-family: "georgia" , serif; font-size: 10.5pt;">.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">Creating a cell:<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-tab-count: 1;"> </span>Cell
cell=row.createCell(int cellnumber);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><span style="mso-tab-count: 1;"> </span>cell.setValue(“creating
a new cell”);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">CellStyle</span></b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">: High level
representation for formatting or styling the information for a cell in excel.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0in;">
<br /></div>
<div class="MsoNormal">
<b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;">References:<o:p></o:p></span></b></div>
<div class="MsoNormal">
<span class="MsoHyperlink"><b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><a href="https://poi.apache.org/components/">https://poi.apache.org/components/</a></span></b></span><b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal">
<span class="MsoHyperlink"><b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><a href="https://poi.apache.org/apidocs/4.0/">https://poi.apache.org/apidocs/4.0/</a></span></b></span><b><span style="font-family: "calibri light" , sans-serif; font-size: 12.0pt; line-height: 107%;"><o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<br /></div>
Ravalihttp://www.blogger.com/profile/13836884142229867271noreply@blogger.com0