This has the whole code for the utility that converts .csv to .xlsx.
Apache POI APIs are used.
You can either modify it and re-use it for your own purpose or just go through it to understand the usage of Apache POI APIs.
You can also find the executable in 'Release' tab and download the jar to use it directly out of the box. ( -h for help )