Landray RDM 189123 Convert Effect

cells source code:
src.zip (1.6 KB)

origin cells:
GTC新店四市预算1.xlsx.zip (15.7 KB)

before converted:
image.png (422.6 KB)

after converted:
image.png (124.3 KB)

Please have a check.

@hucq_landray_com_cn,

Thanks for the template Excel file, screenshots and sample.

I evaluated your issue using your resource files and code snippet. I found you are setting printable area in code. That’s why your output image is not rendered properly or fully. See the code segment with highlighted line of code:

if (originActiveIndex == i - 1) {
worksheet.getPageSetup().setPrintArea(“A1:I4”);
ImageOrPrintOptions imgOption = new ImageOrPrintOptions();
imgOption.setHorizontalResolution(96);
imgOption.setVerticalResolution(96);
imgOption.setDefaultFont(“SimSun”);
imgOption.setQuality(100);
imgOption.setOutputBlankPageWhenNothingToPrint(true);
imgOption.setImageFormat(ImageFormat.getPng());
SheetRender sheetRender = new SheetRender(worksheet, imgOption);
sheetRender.toImage(0, new FileOutputStream(new File(sourceFileDirFile, “thumbnail.png”)));
}
excel.save(new FileOutputStream(new File(sourceFileDirFile, “pageResult” + i + “.html”)), saveOptions);

Please remove or comment out the line of code (from above code segment):
worksheet.getPageSetup().setPrintArea("A1:I4");

I have tested after removing or commenting the above line and it works as expected. The output worksheet image is fine tuned. Please try the suggestion and let us know if you still find any issue.