Hi,
We are having very wired issue while doing autoFitRows using aspose api. When we run the program on windows it works fine, but the same code when we run on Linux (CentOS 5.5) it does not work means autofit row logic does not work.
One thing we have noticed is if we remove the Styling logic then it works on both the environment.
I have attached the both the excel generated via Windows and Linux, and the code to generate the excel.
Could you please look into this issue?
=================Sample Code===========================
public static void main(String[] args) {
Workbook workbook = new Workbook();
WorksheetCollection worksheets = workbook.getWorksheets();
Worksheet sheet = worksheets.get(0);
Cell cell = sheet.getCells().get(“C3”);
sheet.getCells().merge(cell.getRow(),cell.getColumn(), 1, 2);
cell.putValue(“Password Changed Logins Report”);
Style headerStyle = cell.getStyle();
headerStyle.getFont().setColor(Color.getGray());
headerStyle.getFont().setBold(true);
headerStyle.getFont().setSize(12);
headerStyle.setPattern(BackgroundType.SOLID);
headerStyle.setHorizontalAlignment(TextAlignmentType.CENTER);
headerStyle.setTextWrapped(true);
cell.setStyle(headerStyle);
sheet.getCells().setStandardWidthPixels(128);
AutoFitterOptions options = new AutoFitterOptions();
options.setAutoFitMergedCells(true);
try {
sheet.autoFitRows(cell.getRow(), cell.getRow(), options);
} catch (Exception e1) {
e1.printStackTrace();
}
try {
sheet.getWorkbook().save("/tmp/data1.xlsx");
} catch (Exception e) {
e.printStackTrace();
}
}
================================================
Thanks!
Nimesh
Hi Nimesh,
- Operating system version (CentOS 5.5)
- Operating system architecture
- JDK vendor
- JDK version
We have tried using the latest version but no luck same issue.
FYI,
we are using Aspose Cell for Java 8.3.1 version.
We have tried on following OS
==================================================================
CentOS release 6.6 (Final)
==================================================================
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.6 (Final)
Release: 6.6
Codename: Final
Java Info
java version "1.7.0_11"
Java™ SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot™ 64-Bit Server VM (build 23.6-b04, mixed mode)
==================================================================
==================================================================
CentOS release 5.11 (Final)
==================================================================
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.11 (Final)
Release: 5.11
Codename: Final
java version "1.7.0_71"
Java™ SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot™ 64-Bit Server VM (build 24.71-b01, mixed mode)
==================================================================
Thanks!
Nimesh
Hi Nimesh,
System.out.println(CellsHelper.getVersion());
Hi,
Thanks for looking into this issue, we have tried printed API version it showing 8.3.2.4, we have attached the excel generated using new aspose api version.
Just FYI,
We were able to reproduce this issue RedHat server too, we haven’t tried the linux version you have described. Actually our Integration and QA server has CentOS and RedHat server.
On RedHat server we tried only with 8.3.1 aspose api not with the 8.3.2.4 version.
================================================================
RedHatEnterpriseServer
================================================================
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.10 (Tikanga)
Release: 5.10
Codename: Tikanga
java version "1.7.0_11"
Java™ SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot™ 64-Bit Server VM (build 23.6-b04, mixed mode)
================================================================
Thanks!
Nimesh
Hi Nimesh,
Hi Nimesh,
Hi,
Thanks for looking into this issue.
It worked after installing TrueType Fonts on Linux environment.
Thanks!
Nimesh
Hi Nimesh,