I am stuck at a point while trying to export some data into Excel.
Here is my code
List<String> headers = new ArrayList<String>();
//////////////////////////////////////////////
/// Added some headers in between to the list
///////////////////////////////////////////////
HSSFCell[] cell = new HSSFCell[headers.size()];
for (int i = 0; i < headersHSSF.length; i++) {
cell[i] = excelRow.createCell(i);
cell[i].setCellValue(new HSSFRichTextString(headers.get(i)));
}
This code is throwing InvocationTargetException for line
cell[i].setCellValue(new HSSFRichTextString(headers.get(i)));
Can anyone please tell me the reason why is this happening?
(PS: I am calling the code from Flex UI. This is not called from java code)