I’m trying to set a specific column width (actually I need to set a picture into cell, but even if I remove the picture code the problem persists).
This is the code:
final Worksheet worksheet = this.xlsBuilder.getWorksheet();
final Cell localCell = worksheet.getCells().get(row, column);
localCell.setValue("");
// final int index = worksheet.getPictures().add(row, column, fileStream);
// final Picture pic = worksheet.getPictures().get(index);
final double width = 2.35;
final double widthCm = 5.979;
final double height = 1.16;
// pic.setHeightInch(height);
// pic.setWidthInch(width);
final Cells cells = worksheet.getCells();
cells.setRowHeightInch(row, height);
cells.setColumnWidth(column, widthCm);
cells.setColumnWidthInch(column, width);
cells.getColumns().get(column).setWidth(widthCm);
// cells.setStandardWidthInch(width);
Please provide a solution.
Aspose Cells version:
Release-Date: 2014-03-26
Implementation-Title: Aspose.Cells for Java
Implementation-Version: 8.0.0.0