When generating preview of xlsx file it will gives me Cell Exception.
Problem is with D7 cell. It contains value as ‘NA’ change it with 0 it works fine.
Code for generating preview
Workbook workbook = new Workbook(filepath);
WorksheetCollection worksheetCollection = workbook.getWorksheets();
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.setImageFormat(getImageFormat(ImageFormat.getPng());
imgOptions.setOnePagePerSheet(onePagePerSheet);
imgOptions.setHorizontalResolution(150);
imgOptions.setVerticalResolution(150);
imgOptions.setOnlyArea(areaOnly);
for (int i = 0; i < worksheetCollection.getCount(); i++) {
Worksheet worksheet = worksheetCollection.get(i);
SheetRender sr = new SheetRender(worksheet, imageOrPrintOptions);
for (int j = 0; j < sr.getPageCount(); j++) {
String imageFilePath = FileUtils.getAbsoluteFilePath(destinationFilePrefix + (noOfImages++), configurationInfo.getPreviewType().getType());
sr.toImage(j, imageFilePath);
}
}