I am using Apache POI to write data to an Excel template. The template contains only the headings in the first row, but I also applied specific styles to the entire column (for example, accounting and percentage).
It would be nice to use these formats when I write data to new cells. But if I use createRowand methods createCell, the cell format is overwritten, and I get General for all cells. If I try to use getRowand getCellinstead, I throw a NullPointerException, getting an empty cell.
Is there a way to use the previously saved cell formatting saved in the template? Or am I stuck in setting data format via API?
Thank you for your help.
source
share