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 want to bold letters in the Excel file. How can I do that?
I have tried using the JXL API, but every time I have to create a label I want add no label. Can't O edit row and column of the table?
You can use Apache POI for creating native binary xls files.
Or you can use JExcelApi which is another, and somewhat light-weight as far as I can remember, Java library for Excel.
I used also JXLS: it receives the data as a Map and a template EXCEL with the correct syntax and return the file correctly populated. The data in every cell must be a JavaBean with visibility public.
It not worws if you must insert data in more than 1 sheet: in this case I used POI.