Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

25 January 2016

Parsing Excel Document di dalam Java

Dalam sebuah project yang pernah saya kerjakan, ada kebutuhan untuk menterjemahkan data yang ada pada document Ms. Excel (.xls, xlsx) agar dapat dibaca dan diolah oleh program (Java) dan dapat ditulis ke dalam database (Oracle DB).

Untuk keperluan ini, kita dapat menggunakan library dari Apache POI. Anda dapat mendownload JAR di website resmi Apache POI, namun untuk kebutuhan tulisan ini, versi library yang saya gunakan adalah poi v3.9. Jika anda ingin mengolah file XLS, maka gunakan package HSSFSheet, namun kalau yang ingin anda olah adalah file XLSX, maka gunakan package XSSFSheet.


05 June 2013

How To Explode/Split String in JAVA

This code can be used to fulfill split funtion in string.

16 May 2013

Cannot create TypedQuery for query with more than one return

Today i found this error message on my project,
and this code solved my problem.

Code before:

Code after:

29 April 2013

Change Date Format in JAVA

It's a simple program, but it's very often asked by programmer,
Just copy and paste this code/snippets to your IDE Application and run it.

16 April 2013

Convert Date using JSF 2

This is a simple tips to modificate a date type data on your jsf view, with using this snippets you can modify date easily. If you want another result, just modify the date pattern like:
dd-MM-YY, dd-MM-yyyy, etc.