{"id":4769,"date":"2020-08-12T05:44:11","date_gmt":"2020-08-12T05:44:11","guid":{"rendered":"https:\/\/berg-software.com\/?p=4769"},"modified":"2022-07-27T11:56:27","modified_gmt":"2022-07-27T11:56:27","slug":"automated-reporting-java-excel","status":"publish","type":"post","link":"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/","title":{"rendered":"How to: Use Java for automated reporting via Excel"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; fullwidth=&#8221;on&#8221; _builder_version=&#8221;4.4.1&#8243;][et_pb_fullwidth_post_title meta=&#8221;off&#8221; featured_placement=&#8221;background&#8221; _builder_version=&#8221;4.7.7&#8243; title_font=&#8221;||||||||&#8221; title_text_color=&#8221;#ff6317&#8243; title_font_size=&#8221;3.5em&#8221; meta_font=&#8221;|300|||||||&#8221; meta_text_color=&#8221;#ffffff&#8221; meta_font_size=&#8221;1em&#8221; background_enable_color=&#8221;off&#8221; use_background_color_gradient=&#8221;on&#8221; background_color_gradient_start=&#8221;rgba(248,248,248,0.85)&#8221; background_color_gradient_end=&#8221;rgba(248,248,248,0.75)&#8221; background_color_gradient_overlays_image=&#8221;on&#8221; min_height=&#8221;20vh&#8221; height=&#8221;400px&#8221; custom_padding=&#8221;6vh||6vh||false|false&#8221; global_module=&#8221;403&#8243; locked=&#8221;off&#8221;][\/et_pb_fullwidth_post_title][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;4.4.1&#8243; custom_padding=&#8221;|||0px||&#8221; locked=&#8221;off&#8221;][et_pb_row use_custom_gutter=&#8221;on&#8221; _builder_version=&#8221;4.4.4&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;50px|20%|||false|false&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.7.7&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; hover_enabled=&#8221;0&#8243; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243; sticky_enabled=&#8221;0&#8243;]<\/p>\n<p>Automated reporting is a game-changer for any company that uses large amounts of data.<\/p>\n<p>Can you guess what piece of technology medical research, financial engineering, railways, banks, professional services (and basically any field you can think of) all have in common? If you thought \u201cMicrosoft Excel,\u201d then you\u2019re right: the \u201cgreen X\u201d is the common denominator for all things reporting, regardless of industry.<\/p>\n<p>Yes, we know Excel can be (is?) boring. There\u2019s nothing spectacular in rows and columns of data, cell formulas, line and bar graphs, pie charts, pivots \u2013 you name it, it\u2019s all boring. But we strongly believe that there are fewer pieces of software in your toolbox that are as powerful and as easy to use as Excel.<\/p>\n<p>Especially when working with loads of data, Excel makes it pretty easy to order, filter, calculate, visualize and report. Expanding into loads^2 of data and adding automation on top is also relatively simple: just couple Excel with Java to do the hard work of mining databases and delivering clean sheets.<\/p>\n<p>So here we go: if you\u2019re an entrepreneur, C-suit executive, product manager, financial \u201cengineer,\u201d or in any other position having to do with reporting (and\/or databases), you might want to talk to your <a href=\"https:\/\/www.berg-software.com\/\">software development<\/a> team about using the power of Java for automated reporting.<\/p>\n<p>(Also: although we now refer to Excel only, please note that you can automate Word via the same technology, too.)<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; gutter_width=&#8221;3&#8243; _builder_version=&#8221;4.4.1&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px|20%|||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.7.7&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;25px||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; hover_enabled=&#8221;0&#8243; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h2>How does automated reporting work?<\/h2>\n<p>The whole pipeline of \u201cJava to Excel\u201d is no more than four steps:<\/p>\n<ul>\n<li>get your data (\/database) in order;<\/li>\n<li>use <a href=\"http:\/\/poi.apache.org\" target=\"_blank\" rel=\"noopener noreferrer\">Apache POI<\/a> (\u201cthe Java API for Microsoft Documents\u201d) to integrate your data with Java;<\/li>\n<li>have Java pick, compute and format what you need (see functions and code samples below);<\/li>\n<li>report to Excel (possibly: \u201cdownload to Excel\u201d if you\u2019re doing everything in a web browser).<\/li>\n<\/ul>\n<p>Before we proceed to technical details, a reminder that Apache POI is \u201ca project run by the Apache Software Foundation, and previously a sub-project of the Jakarta Project, [that] provides pure Java libraries for reading and writing files in Microsoft Office formats, such as Word, PowerPoint, and Excel.\u201d (via <a href=\"https:\/\/en.wikipedia.org\/wiki\/Apache_POI\" target=\"_blank\" rel=\"noopener noreferrer\">Wikipedia<\/a>)<\/p>\n<p>Back to Apache POI: short of doing the laundry, there are a lot of things it can solve for you:<\/p>\n<ul>\n<li>Fonts down to cell level<\/li>\n<li>Colors (Background and text) down to cell level<\/li>\n<li>Shading down to cell level<\/li>\n<li>Cell patterns down to cell level<\/li>\n<li>Cell initialization<\/li>\n<li>Freeze Panes<\/li>\n<li>Passwords<\/li>\n<li>Images \/ Pictures, both static and dynamic<\/li>\n<li>Headings<\/li>\n<li>Page breaks<\/li>\n<li>Sheet breaks<\/li>\n<li>Text insertion and much more<\/li>\n<li>Functions\/Formula<\/li>\n<li>Merge cells<\/li>\n<li>Row Height<\/li>\n<li>Cell text alignment<\/li>\n<li>Text Rotation<\/li>\n<li>E-mail the spreadsheet<\/li>\n<li>Spreadsheets can be archived so that historical spreadsheets can be retrieved<\/li>\n<\/ul>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; gutter_width=&#8221;3&#8243; _builder_version=&#8221;4.4.1&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px|20%|||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;25px||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h2>Specifics<\/h2>\n<p>Our experience with the Apache POI \u2013 Java \u2013 Excel ecosystem is positive, as we create complex Excel files on a regular basis. To show how easy it is, let\u2019s look into some (not all) specific functions:[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;1. Create an Excel file&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>1. Create an Excel file<\/h3>\n<p>Apache POI works with all the Excel elements: the file itself, spreadsheets, rows and columns etc.[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">HSSFWorkbook workbook <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000000; font-weight: bold;\">new<\/span> HSSFWorkbook<span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nHSSFSheet sheet <span style=\"color: #339933;\">=<\/span> workbook.<span style=\"color: #006633;\">createSheet<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"New Sheet\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n<span style=\"color: #000000; font-weight: bold;\">final<\/span> <span style=\"color: #003399;\">File<\/span> excelFile <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000000; font-weight: bold;\">new<\/span> <span style=\"color: #003399;\">File<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"myExcelFile.xls\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n<span style=\"color: #003399;\">FileOutputStream<\/span> fileOut <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000000; font-weight: bold;\">new<\/span> <span style=\"color: #003399;\">FileOutputStream<\/span><span style=\"color: #009900;\">(<\/span>excelFile, <span style=\"color: #000066; font-weight: bold;\">false<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nworkbook.<span style=\"color: #006633;\">write<\/span><span style=\"color: #009900;\">(<\/span>fileOut<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nworkbook.<span style=\"color: #006633;\">close<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;2. Resize and populate&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>2. Resize and populate<\/h3>\n<p>It is also possible to resize columns and row sizes according to the data. Creating rows, columns, cells and filling them with data is easy:[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">HSSFRow row <span style=\"color: #339933;\">=<\/span> sheet.<span style=\"color: #006633;\">createRow<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nHSSFCell cell <span style=\"color: #339933;\">=<\/span> row.<span style=\"color: #006633;\">createCell<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncell.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Text value\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;3. Style editing&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>3. Style editing<\/h3>\n<p>Using Apache POI, you can do cell-level editing:<\/p>\n<ul>\n<li>set the background color of cells,<\/li>\n<li>borders type and color,<\/li>\n<li>font type, dimension or color,<\/li>\n<li>define styles and use them as needed (e.g. use the same style for more cells without redefining it).<\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\"><span style=\"color: #000000; font-weight: bold;\">final<\/span> HSSFFont arialRed8Font <span style=\"color: #339933;\">=<\/span> workbook.<span style=\"color: #006633;\">createFont<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\narialRed8Font.<span style=\"color: #006633;\">setFontHeightInPoints<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\narialRed8Font.<span style=\"color: #006633;\">setFontName<\/span><span style=\"color: #009900;\">(<\/span> <span style=\"color: #0000ff;\">\"Arial\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\narialRed8Font.<span style=\"color: #006633;\">setColor<\/span><span style=\"color: #009900;\">(<\/span>IndexedColors.<span style=\"color: #006633;\">RED<\/span>.<span style=\"color: #006633;\">getIndex<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\narialRed8Font.<span style=\"color: #006633;\">setBold<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">true<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\n<span style=\"color: #000000; font-weight: bold;\">final<\/span> HSSFCellStyle cellWithThinBordersStyle <span style=\"color: #339933;\">=<\/span> workbook.<span style=\"color: #006633;\">createCellStyle<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setBorderBottom<\/span><span style=\"color: #009900;\">(<\/span>BorderStyle.<span style=\"color: #006633;\">MEDIUM<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setBottomBorderColor<\/span><span style=\"color: #009900;\">(<\/span>IndexedColors.<span style=\"color: #006633;\">BLACK<\/span>.<span style=\"color: #006633;\">getIndex<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setBorderRight<\/span><span style=\"color: #009900;\">(<\/span>BorderStyle.<span style=\"color: #006633;\">MEDIUM<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setRightBorderColor<\/span><span style=\"color: #009900;\">(<\/span>IndexedColors.<span style=\"color: #006633;\">BLACK<\/span>.<span style=\"color: #006633;\">getIndex<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setBorderLeft<\/span><span style=\"color: #009900;\">(<\/span>BorderStyle.<span style=\"color: #006633;\">MEDIUM<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setLeftBorderColor<\/span><span style=\"color: #009900;\">(<\/span>IndexedColors.<span style=\"color: #006633;\">BLACK<\/span>.<span style=\"color: #006633;\">getIndex<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setBorderTop<\/span><span style=\"color: #009900;\">(<\/span>BorderStyle.<span style=\"color: #006633;\">MEDIUM<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setTopBorderColor<\/span><span style=\"color: #009900;\">(<\/span>IndexedColors.<span style=\"color: #006633;\">BLACK<\/span>.<span style=\"color: #006633;\">getIndex<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setFillForegroundColor<\/span><span style=\"color: #009900;\">(<\/span>IndexedColors.<span style=\"color: #006633;\">YELLOW<\/span>.<span style=\"color: #006633;\">getIndex<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setFillPattern<\/span><span style=\"color: #009900;\">(<\/span>FillPatternType.<span style=\"color: #006633;\">SOLID_FOREGROUND<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithThinBordersStyle.<span style=\"color: #006633;\">setFont<\/span><span style=\"color: #009900;\">(<\/span>arialRed8Font<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithStyle.<span style=\"color: #006633;\">setCellStyle<\/span><span style=\"color: #009900;\">(<\/span> cellWithThinBordersStyle<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellWithStyle.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span> <span style=\"color: #0000ff;\">\"Defined cellstyle\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Style-editing-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Style editing&#8221; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Style editing&#8221; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<p>Of course, you can have multiple fonts in a single cell, as in our example:<\/p>\n<ul>\n<li>the first part is [color: red], [font name: Arial Black], [height: 10 points];<\/li>\n<li>the rest of the text is [color: black], [font name: Arial], [height: 8 points], [bold].<\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">HSSFFont firstFont <span style=\"color: #339933;\">=<\/span> workbook.<span style=\"color: #006633;\">createFont<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nfirstFont.<span style=\"color: #006633;\">setFontHeightInPoints<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">10<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nfirstFont.<span style=\"color: #006633;\">setFontName<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Arial Black\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nfirstFont.<span style=\"color: #006633;\">setColor<\/span><span style=\"color: #009900;\">(<\/span>IndexedColors.<span style=\"color: #006633;\">RED<\/span>.<span style=\"color: #006633;\">getIndex<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nfirstFont.<span style=\"color: #006633;\">setBold<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">false<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\nHSSFFont secondFont <span style=\"color: #339933;\">=<\/span> workbook.<span style=\"color: #006633;\">createFont<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nsecondFont.<span style=\"color: #006633;\">setFontHeightInPoints<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">8<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nsecondFont.<span style=\"color: #006633;\">setFontName<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Arial\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nsecondFont.<span style=\"color: #006633;\">setColor<\/span><span style=\"color: #009900;\">(<\/span>IndexedColors.<span style=\"color: #006633;\">BLACK<\/span>.<span style=\"color: #006633;\">getIndex<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nsecondFont.<span style=\"color: #006633;\">setBold<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">true<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\n<span style=\"color: #000000; font-weight: bold;\">final<\/span> HSSFCell cellWith2fonts <span style=\"color: #339933;\">=<\/span> firstRow.<span style=\"color: #006633;\">createCell<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n<span style=\"color: #000000; font-weight: bold;\">final<\/span> <span style=\"color: #003399;\">String<\/span> font1Text <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"Validation failed! \"<\/span><span style=\"color: #339933;\">;<\/span>\n<span style=\"color: #000000; font-weight: bold;\">final<\/span> <span style=\"color: #003399;\">String<\/span> font2Text <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\" Please fill all required data!\"<\/span><span style=\"color: #339933;\">;<\/span>\n<span style=\"color: #000000; font-weight: bold;\">final<\/span> <span style=\"color: #003399;\">String<\/span> allText <span style=\"color: #339933;\">=<\/span> font1Text <span style=\"color: #339933;\">+<\/span> font2Text<span style=\"color: #339933;\">;<\/span>\n\u00a0\n<span style=\"color: #000000; font-weight: bold;\">final<\/span> HSSFRichTextString cellValue <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000000; font-weight: bold;\">new<\/span> HSSFRichTextString<span style=\"color: #009900;\">(<\/span>allText<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellValue.<span style=\"color: #006633;\">applyFont<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>, font1Text.<span style=\"color: #006633;\">length<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span>, firstFont<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncellValue.<span style=\"color: #006633;\">applyFont<\/span><span style=\"color: #009900;\">(<\/span>font1Text.<span style=\"color: #006633;\">length<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span>, <span style=\"color: #009900;\">(<\/span>allText<span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">length<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span>, secondFont<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\ncellWith2fonts.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span>cellValue<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Include-comments-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Include comments&#8221; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Include comments&#8221; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;4. Include comments&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>4. Include comments<\/h3>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">HSSFPatriarch hpt <span style=\"color: #339933;\">=<\/span> sheet.<span style=\"color: #006633;\">createDrawingPatriarch<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nHSSFComment comment <span style=\"color: #339933;\">=<\/span> hpt.<span style=\"color: #006633;\">createComment<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000000; font-weight: bold;\">new<\/span> HSSFClientAnchor<span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #cc66cc;\">0<\/span>, <span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">4<\/span>, <span style=\"color: #cc66cc;\">2<\/span>, <span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">12<\/span>, <span style=\"color: #cc66cc;\">7<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncomment.<span style=\"color: #006633;\">setString<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000000; font-weight: bold;\">new<\/span> HSSFRichTextString<span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"The comment added to the cell.\"<\/span> <span style=\"color: #339933;\">+<\/span> <span style=\"color: #003399;\">System<\/span>.<span style=\"color: #006633;\">getProperty<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"line.separator\"<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #339933;\">+<\/span> <span style=\"color: #0000ff;\">\" New information...\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nnewCell.<span style=\"color: #006633;\">setCellComment<\/span><span style=\"color: #009900;\">(<\/span>comment<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nnewCell.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"This cell has a note!\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;5. Include formulas&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>5. Include formulas<\/h3>\n<p>You can create programmatically complex formula-cells, using values from other cells. For example:[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">sumCell.<span style=\"color: #006633;\">setCellFormula<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"SUM(\"<\/span> <span style=\"color: #339933;\">+<\/span> columnLetter <span style=\"color: #339933;\">+<\/span> firstRow <span style=\"color: #339933;\">+<\/span> <span style=\"color: #0000ff;\">\":\"<\/span> <span style=\"color: #339933;\">+<\/span> columnLetter <span style=\"color: #339933;\">+<\/span> lastRow <span style=\"color: #339933;\">+<\/span> <span style=\"color: #0000ff;\">\")\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]&#8230;results in:[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Include-formulas-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Include formulas&#8221; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Include formulas&#8221; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]Sample formula:[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\"><span style=\"color: #003399;\">String<\/span> formula <span style=\"color: #339933;\">=<\/span> <span style=\"color: #0000ff;\">\"IF(\"<\/span><span style=\"color: #339933;\">+<\/span> columnLetter <span style=\"color: #339933;\">+<\/span> estimationRow <span style=\"color: #339933;\">+<\/span> <span style=\"color: #0000ff;\">\"=0,0,(\"<\/span>\n        <span style=\"color: #339933;\">+<\/span> columnLetter <span style=\"color: #339933;\">+<\/span> cumulatedRow <span style=\"color: #339933;\">+<\/span> <span style=\"color: #0000ff;\">\"\/\"<\/span> <span style=\"color: #339933;\">+<\/span> columnLetter <span style=\"color: #339933;\">+<\/span> estimationRow\n        <span style=\"color: #339933;\">+<\/span> <span style=\"color: #0000ff;\">\")*100)\"<\/span><span style=\"color: #339933;\">;<\/span>\npercentCell.<span style=\"color: #006633;\">setCellFormula<\/span><span style=\"color: #009900;\">(<\/span>formula<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]&#8230;and the result:[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Include-formulas-part-2-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Include formulas part 2&#8243; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Include formulas part 2&#8243; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;6. Add hyperlinks&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>6. Add hyperlinks<\/h3>\n<p>These can point to a web URL, a file, an e-mail application, or to any cell within the file (on any spreadsheet of the same Excel file)[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">HSSFCell cell <span style=\"color: #339933;\">=<\/span> row4.<span style=\"color: #006633;\">createCell<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nCreationHelper createHelper <span style=\"color: #339933;\">=<\/span> workbook.<span style=\"color: #006633;\">getCreationHelper<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nHyperlink link <span style=\"color: #339933;\">=<\/span> createHelper.<span style=\"color: #006633;\">createHyperlink<\/span><span style=\"color: #009900;\">(<\/span>HyperlinkType.<span style=\"color: #003399;\">URL<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nlink.<span style=\"color: #006633;\">setAddress<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"https:\/\/berg-software.com\/\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncell.<span style=\"color: #006633;\">setHyperlink<\/span><span style=\"color: #009900;\">(<\/span>link<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncell.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"URL Link - to our company site\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\ncell <span style=\"color: #339933;\">=<\/span> sheet.<span style=\"color: #006633;\">createRow<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">createCell<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncell.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"File Link\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nlink <span style=\"color: #339933;\">=<\/span> createHelper.<span style=\"color: #006633;\">createHyperlink<\/span><span style=\"color: #009900;\">(<\/span>HyperlinkType.<span style=\"color: #006633;\">FILE<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nlink.<span style=\"color: #006633;\">setAddress<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"myFile.doc\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncell.<span style=\"color: #006633;\">setHyperlink<\/span><span style=\"color: #009900;\">(<\/span>link<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\ncell <span style=\"color: #339933;\">=<\/span> sheet.<span style=\"color: #006633;\">createRow<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">6<\/span><span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">createCell<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">0<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncell.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Email Link\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nlink <span style=\"color: #339933;\">=<\/span> createHelper.<span style=\"color: #006633;\">createHyperlink<\/span><span style=\"color: #009900;\">(<\/span>HyperlinkType.<span style=\"color: #006633;\">EMAIL<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nlink.<span style=\"color: #006633;\">setAddress<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"mailto:contact@bergsoftprod.wpengine.com?\"<\/span> <span style=\"color: #339933;\">+<\/span> <span style=\"color: #0000ff;\">\"subject = Hyperlink\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncell.<span style=\"color: #006633;\">setHyperlink<\/span><span style=\"color: #009900;\">(<\/span>link<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ncell.<span style=\"color: #006633;\">setCellStyle<\/span><span style=\"color: #009900;\">(<\/span>hlinkstyle<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Add-hyperlinks-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Add hyperlinks&#8221; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Add hyperlinks&#8221; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;7. Security&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>7. Security<\/h3>\n<p>You can set a password to protect an entire sheet from changes. This way, you can make sure that operations like deleting, hiding, and editing cell content can only be done by authorized personnel. However, if needed, some cells can be unlocked altogether. [\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">protected_sheet.<span style=\"color: #006633;\">protectSheet<\/span><span style=\"color: #009900;\">(<\/span> <span style=\"color: #0000ff;\">\"mypassword\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\n\u00a0\nCellStyle unlockedCellStyle <span style=\"color: #339933;\">=<\/span> workbook.<span style=\"color: #006633;\">createCellStyle<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nunlockedCellStyle.<span style=\"color: #006633;\">setLocked<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">false<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\nrow.<span style=\"color: #006633;\">createCell<\/span><span style=\"color: #009900;\">(<\/span> <span style=\"color: #cc66cc;\">2<\/span><span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Cell value protected !\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\n<span style=\"color: #000000; font-weight: bold;\">final<\/span> HSSFCell oneCell <span style=\"color: #339933;\">=<\/span> row.<span style=\"color: #006633;\">createCell<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">4<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\noneCell.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"This cell value can be changed !\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\noneCell.<span style=\"color: #006633;\">setCellStyle<\/span><span style=\"color: #009900;\">(<\/span>unlockedCellStyle<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Security-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Security&#8221; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Security&#8221; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;8. Freezing panes&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>8. Freezing panes<\/h3>\n<p>You can freeze the first rows or first columns (i.e. both vertical and horizontal freezing are available). For example: [\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">sheet3.<span style=\"color: #006633;\">createFreezePane<\/span><span style=\"color: #009900;\">(<\/span> <span style=\"color: #cc66cc;\">2<\/span>, <span style=\"color: #cc66cc;\">2<\/span> <span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;9. Collapsing group for columns or rows&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>9. Collapsing group for columns or rows<\/h3>\n<p>It is also very simple to do:[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">sheet.<span style=\"color: #006633;\">groupColumn<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">2<\/span>, <span style=\"color: #cc66cc;\">5<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nsheet.<span style=\"color: #006633;\">groupRow<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">7<\/span>, <span style=\"color: #cc66cc;\">9<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;10. Cell validation&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>10. Cell validation<\/h3>\n<p>It is possible to set data validations cells. In the example below, we use one writable cell to check if the user has set one of the values 10, 20 or 30, and we do not allow another value to be set. The user will be informed via a message prompt (that can also be either defined or default). [\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]The default message:[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Cell-validation-default-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Cell validation default&#8221; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Cell validation default&#8221; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]It can be customized with a single line of code:[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">sheet.<span style=\"color: #006633;\">createRow<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #cc66cc;\">25<\/span><span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">createCell<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">setCellValue<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"10\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nCellRangeAddressList addressList <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000000; font-weight: bold;\">new<\/span> CellRangeAddressList<span style=\"color: #009900;\">(<\/span>\n        <span style=\"color: #cc66cc;\">25<\/span>, <span style=\"color: #cc66cc;\">25<\/span>, <span style=\"color: #cc66cc;\">3<\/span>, <span style=\"color: #cc66cc;\">3<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nDVConstraint dvConstraint <span style=\"color: #339933;\">=<\/span> DVConstraint.<span style=\"color: #006633;\">createExplicitListConstraint<\/span><span style=\"color: #009900;\">(<\/span>\n        <span style=\"color: #000000; font-weight: bold;\">new<\/span> <span style=\"color: #003399;\">String<\/span><span style=\"color: #009900;\">[<\/span><span style=\"color: #009900;\">]<\/span><span style=\"color: #009900;\">{<\/span><span style=\"color: #0000ff;\">\"10\"<\/span>, <span style=\"color: #0000ff;\">\"20\"<\/span>, <span style=\"color: #0000ff;\">\"30\"<\/span><span style=\"color: #009900;\">}<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\nDataValidation dataValidation <span style=\"color: #339933;\">=<\/span> <span style=\"color: #000000; font-weight: bold;\">new<\/span> HSSFDataValidation\n        <span style=\"color: #009900;\">(<\/span>addressList, dvConstraint<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ndataValidation.<span style=\"color: #006633;\">setSuppressDropDownArrow<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">true<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ndataValidation.<span style=\"color: #006633;\">setErrorStyle<\/span><span style=\"color: #009900;\">(<\/span>DataValidation.<span style=\"color: #006633;\">ErrorStyle<\/span>.<span style=\"color: #006633;\">STOP<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\ndataValidation.<span style=\"color: #006633;\">createErrorBox<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Validation Error\"<\/span>, <span style=\"color: #0000ff;\">\"The accepted values are: 10, 20 and 30!\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\nsheet.<span style=\"color: #006633;\">addValidationData<\/span><span style=\"color: #009900;\">(<\/span>dataValidation<span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Cell-validation-customised-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Cell validation customised&#8221; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Cell validation customised&#8221; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;11. Header and footer are not difficult&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>11. Header and footer are not difficult<\/h3>\n<p>You can set left, center or right headers (or all of them) with custom fonts: [\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">Header header <span style=\"color: #339933;\">=<\/span> sheet.<span style=\"color: #006633;\">getHeader<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nheader.<span style=\"color: #006633;\">setCenter<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Center Header\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nheader.<span style=\"color: #006633;\">setLeft<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Left Header\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nheader.<span style=\"color: #006633;\">setRight<\/span><span style=\"color: #009900;\">(<\/span>HSSFHeader.<span style=\"color: #006633;\">font<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Stencil-Normal\"<\/span>, <span style=\"color: #0000ff;\">\"Italic\"<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #339933;\">+<\/span>\n        HSSFHeader.<span style=\"color: #006633;\">fontSize<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000066; font-weight: bold;\">short<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #cc66cc;\">16<\/span><span style=\"color: #009900;\">)<\/span> <span style=\"color: #339933;\">+<\/span> <span style=\"color: #0000ff;\">\"Right Header - special font\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\n\u00a0\nsheet.<span style=\"color: #006633;\">getFooter<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">setCenter<\/span><span style=\"color: #009900;\">(<\/span> <span style=\"color: #0000ff;\">\"Center Footer\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nsheet.<span style=\"color: #006633;\">getFooter<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">setLeft<\/span><span style=\"color: #009900;\">(<\/span> <span style=\"color: #0000ff;\">\"Left Footer\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span>\nsheet.<span style=\"color: #006633;\">getFooter<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #009900;\">)<\/span>.<span style=\"color: #006633;\">setRight<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #0000ff;\">\"Right Footer\"<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]The outcome:[\/et_pb_text][et_pb_image src=&#8221;\/\/cdn.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel-Header-and-footer-1.jpg&#8221; alt=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Header and footer&#8221; title_text=&#8221;Berg Software &#8211; automated reporting &#8211; Java to Excel &#8211; Header and footer&#8221; _builder_version=&#8221;4.4.6&#8243; custom_padding=&#8221;20px||20px|100px|false|false&#8221;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;12. Merge cells&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>12. Merge cells<\/h3>\n<p>You only need one command to specify the range of cells to be merged:[\/et_pb_text][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; background_color=&#8221;#fbfbfb&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<pre class=\"java\" style=\"font-family: monospace;\">sheet.<span style=\"color: #006633;\">addMergedRegion<\/span><span style=\"color: #009900;\">(<\/span><span style=\"color: #000000; font-weight: bold;\">new<\/span> CellRangeAddress<span style=\"color: #009900;\">(<\/span>firstRowNumber, lastRowNumber, mergedCellFirstCol, mergedCellLastCol<span style=\"color: #009900;\">)<\/span><span style=\"color: #009900;\">)<\/span><span style=\"color: #339933;\">;<\/span><\/pre>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; admin_label=&#8221;13. Graphs&#8221; _builder_version=&#8221;4.4.6&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;||||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||15px|25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h3>13. Graphs<\/h3>\n<p>Apache POI can help creating different charts (e.g. line, bar, pie charts etc.), including their 3D variants:[\/et_pb_text][et_pb_gallery gallery_ids=&#8221;4893,4897,4895&#8243; fullwidth=&#8221;on&#8221; _builder_version=&#8221;4.4.6&#8243; max_width=&#8221;75%&#8221; module_alignment=&#8221;left&#8221; height=&#8221;475px&#8221; custom_padding=&#8221;|100px||100px|false|false&#8221;][\/et_pb_gallery][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; gutter_width=&#8221;3&#8243; _builder_version=&#8221;4.4.1&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px|20%|||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;25px||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h2>Limitations<\/h2>\n<p>You have probably figured it out by now that you can perform any Excel functionalities via Java \/ Apache POI. However, when two special settings apply to the same set of cells, there might be limitations.<\/p>\n<p>For example:<\/p>\n<ul>\n<li>You can add a picture or hide\/collapse cells. But when doing both at the same time (insert a picture on a row that we later collapsed), the image was not shown completely. As a workaround, you can set the image anchor with the count of visible rows\/columns \u2013 it will keep the full image visible, regardless of expanding\/collapsing cells.<\/li>\n<li>When using collapsible columns, it can be difficult to adjust the comments anchor.<\/li>\n<li>There is a limitation to 256 columns per sheet when using HSSF.<\/li>\n<\/ul>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.7.7&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;25px||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; hover_enabled=&#8221;0&#8243; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243; sticky_enabled=&#8221;0&#8243;]<\/p>\n<h2>\u2014<\/h2>\n<p>When working with large sets of data that need any level of automation, we strongly recommend using Java to create, edit, compute and download associated Excel files. For most of the functions, you only need a few lines of code. But then, having an Excel file that you can further tinker with is priceless. The benefits of automated reporting are endless.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row use_custom_gutter=&#8221;on&#8221; gutter_width=&#8221;3&#8243; _builder_version=&#8221;4.4.4&#8243; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px|20%|75px||false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;rgba(0,0,0,0)&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_text _builder_version=&#8221;4.4.6&#8243; text_font=&#8221;|300|||||||&#8221; quote_font=&#8221;|700|||||||&#8221; quote_text_align=&#8221;left&#8221; quote_font_size=&#8221;16px&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;30px&#8221; header_3_font_size=&#8221;23px&#8221; header_4_font=&#8221;||||||||&#8221; header_4_font_size=&#8221;16px&#8221; header_4_line_height=&#8221;1.5em&#8221; header_5_font_size=&#8221;14px&#8221; custom_margin=&#8221;25px||||false|false&#8221; custom_padding=&#8221;|||25px|false|false&#8221; border_width_left=&#8221;1px&#8221; border_color_left=&#8221;#ff6317&#8243;]<\/p>\n<h2>\u2014<\/h2>\n<p>Do you need further ideas or guidance on \u201cJava to Excel\u201d? <a href=\"https:\/\/berg-software.com\/contact-berg-software\/\">Let us know<\/a>!<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; _builder_version=&#8221;3.22&#8243; background_color=&#8221;#eeeeee&#8221; custom_padding=&#8221;50px||50px||false|false&#8221; border_color_top=&#8221;#ff6317&#8243; global_module=&#8221;1642&#8243;][et_pb_row column_structure=&#8221;1_3,1_3,1_3&#8243; _builder_version=&#8221;4.4.1&#8243; custom_padding=&#8221;0px|||||&#8221; locked=&#8221;off&#8221;][et_pb_column type=&#8221;1_3&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_social_media_follow _builder_version=&#8221;4.4.4&#8243; text_orientation=&#8221;left&#8221;][et_pb_social_media_follow_network social_network=&#8221;linkedin&#8221; url=&#8221;https:\/\/www.linkedin.com\/company\/berg-computers-srl\/&#8221; _builder_version=&#8221;4.4.4&#8243; background_color=&#8221;#007bb6&#8243; follow_button=&#8221;off&#8221; url_new_window=&#8221;on&#8221;]linkedin[\/et_pb_social_media_follow_network][et_pb_social_media_follow_network social_network=&#8221;twitter&#8221; url=&#8221;https:\/\/twitter.com\/berg_software&#8221; _builder_version=&#8221;4.4.4&#8243; background_color=&#8221;#00aced&#8221; follow_button=&#8221;off&#8221; url_new_window=&#8221;on&#8221;]twitter[\/et_pb_social_media_follow_network][et_pb_social_media_follow_network social_network=&#8221;facebook&#8221; url=&#8221;https:\/\/www.facebook.com\/bergCOMPUTERS&#8221; _builder_version=&#8221;4.4.4&#8243; background_color=&#8221;#3b5998&#8243; follow_button=&#8221;off&#8221; url_new_window=&#8221;on&#8221;]facebook[\/et_pb_social_media_follow_network][et_pb_social_media_follow_network social_network=&#8221;instagram&#8221; url=&#8221;https:\/\/www.instagram.com\/berg_software\/&#8221; _builder_version=&#8221;4.4.4&#8243; background_color=&#8221;#ea2c59&#8243; follow_button=&#8221;off&#8221; url_new_window=&#8221;on&#8221;]instagram[\/et_pb_social_media_follow_network][\/et_pb_social_media_follow][\/et_pb_column][et_pb_column type=&#8221;1_3&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_post_nav in_same_term=&#8221;on&#8221; show_next=&#8221;off&#8221; _builder_version=&#8221;4.4.1&#8243; title_text_color=&#8221;#ff6317&#8243; custom_padding=&#8221;|25px|||false|false&#8221;][\/et_pb_post_nav][\/et_pb_column][et_pb_column type=&#8221;1_3&#8243; _builder_version=&#8221;4.4.1&#8243;][et_pb_post_nav in_same_term=&#8221;on&#8221; show_prev=&#8221;off&#8221; _builder_version=&#8221;4.4.1&#8243; title_text_color=&#8221;#ff6317&#8243; custom_padding=&#8221;|||25px|false|false&#8221;][\/et_pb_post_nav][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;CONTACT&#8221; _builder_version=&#8221;4.4.1&#8243; background_color=&#8221;#d2d2d2&#8243; custom_padding=&#8221;75px||75px||false|false&#8221;][et_pb_row column_structure=&#8221;1_4,3_4&#8243; admin_label=&#8221;Service Section Title&#8221; _builder_version=&#8221;4.4.1&#8243; custom_padding=&#8221;||25px||false|false&#8221; animation_direction=&#8221;top&#8221; locked=&#8221;off&#8221;][et_pb_column type=&#8221;1_4&#8243; _builder_version=&#8221;3.25&#8243; custom_padding=&#8221;|||&#8221; custom_padding__hover=&#8221;|||&#8221;][\/et_pb_column][et_pb_column type=&#8221;3_4&#8243; _builder_version=&#8221;3.25&#8243; custom_padding=&#8221;|||&#8221; custom_padding__hover=&#8221;|||&#8221;][et_pb_text _builder_version=&#8221;4.4.1&#8243; text_font=&#8221;|300|||||||&#8221; text_text_color=&#8221;#ffffff&#8221; text_line_height=&#8221;1.1em&#8221; header_5_font=&#8221;|600|||||||&#8221; header_5_text_color=&#8221;#ffffff&#8221; header_5_font_size=&#8221;14px&#8221; header_5_line_height=&#8221;1.5em&#8221; custom_margin=&#8221;||||false|false&#8221;]29 years in business | 2700 software projects | 760 clients | 24 countries<\/p>\n<h5>We turn ideas into software. What is yours?<\/h5>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Title&#8221; _builder_version=&#8221;4.4.1&#8243; header_text_align=&#8221;center&#8221; header_2_font=&#8221;|300|||||||&#8221; header_2_text_align=&#8221;left&#8221; header_2_text_color=&#8221;#ff6317&#8243; header_2_font_size=&#8221;50px&#8221; header_2_line_height=&#8221;0.9em&#8221; custom_margin=&#8221;||||false|false&#8221; custom_padding=&#8221;25px||25px||false|false&#8221;]<\/p>\n<h2>Get in touch<\/h2>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8221;1_4,3_4&#8243; _builder_version=&#8221;4.4.4&#8243;][et_pb_column type=&#8221;1_4&#8243; _builder_version=&#8221;4.4.4&#8243;][\/et_pb_column][et_pb_column type=&#8221;3_4&#8243; _builder_version=&#8221;4.4.4&#8243;][et_pb_contact_form email=&#8221;contact@bergsoftprod.wpengine.com&#8221; custom_message=&#8221;WEBFORM MESSAGE||et_pb_line_break_holder||\uff3f||et_pb_line_break_holder||FROM: %%Name%%||et_pb_line_break_holder||EMAIL: %%Email%%||et_pb_line_break_holder||PHONE NUMBER: %%Phone_number%%||et_pb_line_break_holder||COMPANY: %%Company_name%%||et_pb_line_break_holder||TERMS &amp; CONDITIONS: %%Terms_and_Conditions%%||et_pb_line_break_holder||DATA PRIVACY POLICY: %%Data_Privacy_Policy%%||et_pb_line_break_holder||\uff3f||et_pb_line_break_holder||MESSAGE:||et_pb_line_break_holder||%%Message%%&#8221; success_message=&#8221;Thank you for reaching out! Your message was sent. We will get back to you right away.&#8221; _builder_version=&#8221;4.4.4&#8243; form_field_background_color=&#8221;#d2d2d2&#8243; form_field_text_color=&#8221;#ffffff&#8221; form_field_focus_background_color=&#8221;#ffffff&#8221; form_field_focus_text_color=&#8221;#000000&#8243; title_level=&#8221;h2&#8243; title_font=&#8221;|300|||||||&#8221; title_text_color=&#8221;#ff6317&#8243; title_font_size=&#8221;30px&#8221; form_field_line_height=&#8221;1.5em&#8221; custom_button=&#8221;on&#8221; button_text_size=&#8221;14px&#8221; button_text_color=&#8221;#ffffff&#8221; button_bg_color=&#8221;#ff6317&#8243; button_border_width=&#8221;0px&#8221; button_border_radius=&#8221;0px&#8221; button_icon=&#8221;%%3%%&#8221; button_on_hover=&#8221;off&#8221; border_color_all=&#8221;#ffffff&#8221; border_width_bottom=&#8221;1px&#8221;][et_pb_contact_field field_id=&#8221;Name&#8221; field_title=&#8221;Name *&#8221; fullwidth_field=&#8221;on&#8221; _builder_version=&#8221;4.4.4&#8243; form_field_background_color=&#8221;#d2d2d2&#8243; form_field_text_color=&#8221;#ffffff&#8221; form_field_focus_background_color=&#8221;#ffffff&#8221; form_field_focus_text_color=&#8221;#000000&#8243; border_width_bottom=&#8221;1px&#8221; button_text_size__hover_enabled=&#8221;off&#8221; button_one_text_size__hover_enabled=&#8221;off&#8221; button_two_text_size__hover_enabled=&#8221;off&#8221; button_text_color__hover_enabled=&#8221;off&#8221; button_one_text_color__hover_enabled=&#8221;off&#8221; button_two_text_color__hover_enabled=&#8221;off&#8221; button_border_width__hover_enabled=&#8221;off&#8221; button_one_border_width__hover_enabled=&#8221;off&#8221; button_two_border_width__hover_enabled=&#8221;off&#8221; button_border_color__hover_enabled=&#8221;off&#8221; button_one_border_color__hover_enabled=&#8221;off&#8221; button_two_border_color__hover_enabled=&#8221;off&#8221; button_border_radius__hover_enabled=&#8221;off&#8221; button_one_border_radius__hover_enabled=&#8221;off&#8221; button_two_border_radius__hover_enabled=&#8221;off&#8221; button_letter_spacing__hover_enabled=&#8221;off&#8221; button_one_letter_spacing__hover_enabled=&#8221;off&#8221; button_two_letter_spacing__hover_enabled=&#8221;off&#8221; button_bg_color__hover_enabled=&#8221;off&#8221; button_one_bg_color__hover_enabled=&#8221;off&#8221; button_two_bg_color__hover_enabled=&#8221;off&#8221;][\/et_pb_contact_field][et_pb_contact_field field_id=&#8221;Email&#8221; field_title=&#8221;Email address *&#8221; field_type=&#8221;email&#8221; fullwidth_field=&#8221;on&#8221; _builder_version=&#8221;4.4.4&#8243; button_text_size__hover_enabled=&#8221;off&#8221; button_one_text_size__hover_enabled=&#8221;off&#8221; button_two_text_size__hover_enabled=&#8221;off&#8221; button_text_color__hover_enabled=&#8221;off&#8221; button_one_text_color__hover_enabled=&#8221;off&#8221; button_two_text_color__hover_enabled=&#8221;off&#8221; button_border_width__hover_enabled=&#8221;off&#8221; button_one_border_width__hover_enabled=&#8221;off&#8221; button_two_border_width__hover_enabled=&#8221;off&#8221; button_border_color__hover_enabled=&#8221;off&#8221; button_one_border_color__hover_enabled=&#8221;off&#8221; button_two_border_color__hover_enabled=&#8221;off&#8221; button_border_radius__hover_enabled=&#8221;off&#8221; button_one_border_radius__hover_enabled=&#8221;off&#8221; button_two_border_radius__hover_enabled=&#8221;off&#8221; button_letter_spacing__hover_enabled=&#8221;off&#8221; button_one_letter_spacing__hover_enabled=&#8221;off&#8221; button_two_letter_spacing__hover_enabled=&#8221;off&#8221; button_bg_color__hover_enabled=&#8221;off&#8221; button_one_bg_color__hover_enabled=&#8221;off&#8221; button_two_bg_color__hover_enabled=&#8221;off&#8221;][\/et_pb_contact_field][et_pb_contact_field field_id=&#8221;Phone_number&#8221; field_title=&#8221;Phone number&#8221; required_mark=&#8221;off&#8221; fullwidth_field=&#8221;on&#8221; _builder_version=&#8221;4.4.4&#8243;][\/et_pb_contact_field][et_pb_contact_field field_id=&#8221;Company_name&#8221; field_title=&#8221;Company name&#8221; fullwidth_field=&#8221;on&#8221; _builder_version=&#8221;4.4.4&#8243;][\/et_pb_contact_field][et_pb_contact_field field_id=&#8221;Message&#8221; field_title=&#8221;Message *&#8221; field_type=&#8221;text&#8221; fullwidth_field=&#8221;on&#8221; _builder_version=&#8221;4.4.4&#8243; form_field_background_color=&#8221;#d2d2d2&#8243; form_field_focus_background_color=&#8221;#ffffff&#8221; form_field_focus_text_color=&#8221;#000000&#8243; border_width_bottom=&#8221;1px&#8221; button_text_size__hover_enabled=&#8221;off&#8221; button_one_text_size__hover_enabled=&#8221;off&#8221; button_two_text_size__hover_enabled=&#8221;off&#8221; button_text_color__hover_enabled=&#8221;off&#8221; button_one_text_color__hover_enabled=&#8221;off&#8221; button_two_text_color__hover_enabled=&#8221;off&#8221; button_border_width__hover_enabled=&#8221;off&#8221; button_one_border_width__hover_enabled=&#8221;off&#8221; button_two_border_width__hover_enabled=&#8221;off&#8221; button_border_color__hover_enabled=&#8221;off&#8221; button_one_border_color__hover_enabled=&#8221;off&#8221; button_two_border_color__hover_enabled=&#8221;off&#8221; button_border_radius__hover_enabled=&#8221;off&#8221; button_one_border_radius__hover_enabled=&#8221;off&#8221; button_two_border_radius__hover_enabled=&#8221;off&#8221; button_letter_spacing__hover_enabled=&#8221;off&#8221; button_one_letter_spacing__hover_enabled=&#8221;off&#8221; button_two_letter_spacing__hover_enabled=&#8221;off&#8221; button_bg_color__hover_enabled=&#8221;off&#8221; button_one_bg_color__hover_enabled=&#8221;off&#8221; button_two_bg_color__hover_enabled=&#8221;off&#8221;][\/et_pb_contact_field][et_pb_contact_field field_id=&#8221;Terms_and_Conditions&#8221; field_title=&#8221; &#8221; field_type=&#8221;checkbox&#8221; checkbox_options=&#8221;%91{%22value%22:%22I have read and accepted the Terms and Conditions%22,%22checked%22:0,%22dragID%22:-1}%93&#8243; fullwidth_field=&#8221;on&#8221; _builder_version=&#8221;4.4.4&#8243;][\/et_pb_contact_field][et_pb_contact_field field_id=&#8221;Data_Privacy_Policy&#8221; field_title=&#8221; &#8221; field_type=&#8221;checkbox&#8221; checkbox_options=&#8221;%91{%22value%22:%22I have read and accepted the Data Privacy Policy%22,%22checked%22:0,%22dragID%22:-1}%93&#8243; fullwidth_field=&#8221;on&#8221; _builder_version=&#8221;4.4.4&#8243;][\/et_pb_contact_field][\/et_pb_contact_form][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Working with loads^2 of data and adding automation on top is relatively simple: just couple Excel with Java to boost your automated reporting.<\/p>\n","protected":false},"author":8,"featured_media":4771,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"2880","footnotes":""},"categories":[138,33],"tags":[],"class_list":["post-4769","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-insights"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v16.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to: Use Java for automated reporting via Excel | Berg Software<\/title>\n<meta name=\"description\" content=\"Automated reporting is a game-changer for any company that uses large amounts of data. Can you guess what piece of technology medical research,\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to: Use Java for automated reporting via Excel | Berg Software\" \/>\n<meta property=\"og:description\" content=\"Automated reporting is a game-changer for any company that uses large amounts of data. Can you guess what piece of technology medical research,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/\" \/>\n<meta property=\"og:site_name\" content=\"Berg Software\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bergCOMPUTERS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-12T05:44:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-27T11:56:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@berg_software\" \/>\n<meta name=\"twitter:site\" content=\"@berg_software\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"14 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.berg-software.com\/en\/#organization\",\"name\":\"Berg Software\",\"url\":\"https:\/\/www.berg-software.com\/en\/\",\"sameAs\":[\"https:\/\/www.facebook.com\/bergCOMPUTERS\/\",\"https:\/\/www.instagram.com\/berg_software\/\",\"https:\/\/www.linkedin.com\/company\/berg-computers-srl\/\",\"https:\/\/www.youtube.com\/channel\/UCw1FfcRJnC-CoKPwlcM10Iw\",\"https:\/\/twitter.com\/berg_software\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.berg-software.com\/en\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/berg-software.com\/wp-content\/uploads\/berg-software-logo.png\",\"contentUrl\":\"https:\/\/berg-software.com\/wp-content\/uploads\/berg-software-logo.png\",\"width\":512,\"height\":512,\"caption\":\"Berg Software\"},\"image\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.berg-software.com\/en\/#website\",\"url\":\"https:\/\/www.berg-software.com\/en\/\",\"name\":\"Berg Software\",\"description\":\"We turn ideas into software.\",\"publisher\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.berg-software.com\/en\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel.jpg\",\"contentUrl\":\"https:\/\/www.berg-software.com\/wp-content\/uploads\/Berg-Software-automated-reporting-Java-to-Excel.jpg\",\"width\":1200,\"height\":600,\"caption\":\"Berg Software - automated reporting - Java to Excel\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#webpage\",\"url\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/\",\"name\":\"How to: Use Java for automated reporting via Excel | Berg Software\",\"isPartOf\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#primaryimage\"},\"datePublished\":\"2020-08-12T05:44:11+00:00\",\"dateModified\":\"2022-07-27T11:56:27+00:00\",\"description\":\"Automated reporting is a game-changer for any company that uses large amounts of data. Can you guess what piece of technology medical research,\",\"breadcrumb\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.berg-software.com\/en\/\",\"url\":\"https:\/\/www.berg-software.com\/en\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.berg-software.com\/en\/category\/insights\/\",\"url\":\"https:\/\/www.berg-software.com\/en\/category\/insights\/\",\"name\":\"Insights\"}},{\"@type\":\"ListItem\",\"position\":3,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/\",\"url\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/\",\"name\":\"How to: Use Java for automated reporting via Excel\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/#\/schema\/person\/5e24716ba12e25cc149bc8de9f3110b6\"},\"headline\":\"How to: Use Java for automated reporting via Excel\",\"datePublished\":\"2020-08-12T05:44:11+00:00\",\"dateModified\":\"2022-07-27T11:56:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#webpage\"},\"publisher\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.berg-software.com\/en\/automated-reporting-java-excel\/#primaryimage\"},\"articleSection\":\"How to,Insights\",\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.berg-software.com\/en\/#\/schema\/person\/5e24716ba12e25cc149bc8de9f3110b6\",\"name\":\"Alina Jurj\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","_links":{"self":[{"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/posts\/4769","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/comments?post=4769"}],"version-history":[{"count":0,"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/posts\/4769\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/media\/4771"}],"wp:attachment":[{"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/media?parent=4769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/categories?post=4769"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.berg-software.com\/en\/wp-json\/wp\/v2\/tags?post=4769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}