我正在使用 NatTable (Eclipse Nebula) 导出 Excel 工作表。它包含标题层中的图像以及标题和正文中的一些文本。以下是配置代码:
ImagePainter bgImagePainter = new ImagePainter(getImg());
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, bgImagePainter, DisplayMode.NORMAL, HeaderLayout.overImg);
configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_STYLE, cellStyle, DisplayMode.NORMAL, HeaderLayout.overImg);
此外,我使用ExcelExporter
将数据导出到 Excel 工作簿。
我不知道错误可能出在哪里,因为所有其他列中的文本都显示得很好。如果您需要查看任何其他代码片段,我将对其进行更新。