Link to home
Start Free TrialLog in
Avatar of royalcyber
royalcyber

asked on

converting from properties to excel

I have a simple java properties file : common_en.properties

key1=joe
key2=newman
key3="<tr><td class="main" colspan="2"> My learnin </td></tr>
...

...

..



I want to write a small java program which will read this and save it as a csv or xls so when I open it

in excel I have key1 in ( col1) and value in ( col2)

can some have any sample code which already does this


Thankyou!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Avatar of Ajay-Singh
Ajay-Singh

try using poi api's to access excel:

http://jakarta.apache.org/poi/
ASKER CERTIFIED SOLUTION
Avatar of Ajay-Singh
Ajay-Singh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
remember you need to download poi library from the above source and keep it in the classpath
Avatar of CEHJ
You don't need to use any special library to create a csv file, which you can open in Excel. Of course, a csv file from a properties file can only have one row and is not ordered
you can use the following to create csv

http://ostermiller.org/utils/CSV.html
You can use open-office for creating XLS files:

http://api.openoffice.org