I want to create an Excel file and write data just like writing a text file with Java. I tried to change file extension from .txt to .xls. But I wa
To create a spreadsheet and format a cell using POI, see the Working with Fonts example, and use:
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
POI works very well. There are some things you can't do (e.g. create VBA macros), but it'll read/write spreadsheets with macros, so you can create a suitable template sheet, read it and manipulate it with POI, and then write it out.