No difference between "none" Table style's border and non-exitent Table style

Posted by: eyal.ofri on 21 May 2023, 4:04 am EST

    • Post Options:
    • Link

    Posted 21 May 2023, 4:04 am EST - Updated 21 May 2023, 4:12 am EST

    I created an excel file that has 2 custom table styles in it.

    1. Has only “Whole Table” borders, without any “Row Header” styles
    2. Has “Whole Table” borders and in addition has “Row Header” style that define “topBorder: none”.

    When I import this file into GrapeCity it’s displayed correctly.

    But when I try to inspect the properties in Java I don’t see any difference between the 2 tables that indicates the actual difference in styles between the 2 tables.

    The path I looked at:

    worksheet.getTables().get(0).getTableStyle().getTableStyleElements().get(TableStyleElementType.HeaderRow)

    I attached the excel file I used and described above.table.zip

  • Posted 22 May 2023, 8:37 am EST

    Hi,

    We are discussing this with the development team. Will get back to you once we have any update from them.[Internal Tracking Id - DOCXLS-8267]

    Best Regards,

    Nitin

  • Posted 23 May 2023, 8:26 am EST

    Hi,

    As per the development team, there’s no such method that could get the difference from table API.

    While we can get the difference using the cell’s display format:

    IBorder b1 = wb.getWorksheets().get(0).getRange("B6").getDisplayFormat().getBorders().get(BordersIndex.EdgeTop);
    IBorder b2 = wb.getWorksheets().get(0).getRange("G6").getDisplayFormat().getBorders().get(BordersIndex.EdgeTop);
    System.out.println(b1.getLineStyle());
    System.out.println(b2.getLineStyle());

    Please refer the attached sample: GcExcel.zip

    Best Regards,

    Nitin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels