Create Excel File in Java using Apache POI Library

Author posted by Jitendra on Posted on under category Categories JAVA and tagged as Tags , , , with 5 Comments on Create Excel File in Java using Apache POI Library

Recently, I came across requirement to create ExcelSheet from thin Java Client used by Salesforce. So, I though to share my experience on Creating Excel Sheet in Java. As we know that Java is product of Oracle and Excel is product of Microsoft. Off-course, There will be no standard functionality available in Java to achieve our requirement of creating Excel Sheet. However thanks to Apache for their POI Library. POI Stands for “Poor Obfuscation Implementation” as the file formats created by this library is obfuscated poorly with help of reverse Engineering. Anyways, we don’t have to bother about it and thankful to them for providing such wonderful library.

Apache POI library can be used to create Excel Sheet, Word Document and PowerPoint. In this post, we will be totally focusing on Excel Sheet using “XSSF (XML Spreadsheet Format)” component.

Prerequisite :
Add all jar files downloaded from Apache POI download site in Java Program’s build path. Continue reading “Create Excel File in Java using Apache POI Library”

microsot Excel – Change content of alternate cell on change of the cell value using macros

Using VBA script to change the content of alternate column on the basis of value changed in other column of excel sheet

Microsoft excel is very powerful tool to work on the related data. This time i needed a unique functionality in excel sheet and wanted to share with you all. So to create the macro enabled excel sheet, while saving file in file types, select the micro enabled workbook. In Microsoft Excel 2010 the extension of such type of file is “xlsm”.

Requirement:

on changing of auto complete column, a message box should appear and after clicking on button, the adjacent cell value should get changed as shown in below image:

Change content of alternate cell on change of the cell value using macros
Change content of alternate cell on change of the cell value using macros

Continue reading “microsot Excel – Change content of alternate cell on change of the cell value using macros”