A little JAVA break…

Posts Tagged ‘Java’

Today i want to tell you, how do you create and write excel files in java. First of all we must download apache’s POI api in here. (The JAVA api for Microsoft Document.) In fact this api doesn’t for only excel. You can use this api for word, power point, and etc… It supports office from 97 to 2007. You can create,read or write xls, xlsx, doc, docx and etc.. I must say this api is more fastest than c# office interop api. You must add jars into your project.

Now we create an excel xlsx file and we write some text in this file. Ok lets write some code.

You must create workbook, sheet, row and cell for write something into the cell. I use XSSF for xlsx, if you want to create, read or write xls you can use HSSF. For about more information please visit POI project website. You can find more good artice at there.

In this article i explain how to connect oracle with jdbc. Before we start, we must download oracle oci driver for oracle version. You can find these oci drivers from here.

I use Oracle driver for Oracle 10.x database. After you download the Oracle oci driver we can start . We add new Java Project in eclipse. In libraries from “add external jars”, you must choice oci driver jar file.(I select ojdbc14.jar for oracle 10.x.) We add a main class for getting output from sql.

I wrote an open source program in java. And i called it Change It Easy. This program have easy function for now. It lists a running proxy from the proxy list website. You can download this project and source from here. It runs in linux, windows and etc… For execute this program you have to install JRE(java runtime environment).