Hi,
I am using aspose for Java on Eclipse. I am able to merge a set of cells by the generic code:
Workbook workbook = new Workbook();
Worksheets worksheets = workbook.getWorksheets();
Worksheet worksheet = worksheets.getSheet(0);
Cells cells = worksheet.getCells();
cells.merge(row, col, mergeRow, mergeCol);
But now how would I go about and add a preset outline around the merged cell?
I have tried :
this.setStyle_addBorder(cell, BorderType.TOP, BorderLineType.THIN);
this.setStyle_addBorder(cell, BorderType.BOTTOM, BorderLineType.THIN);
this.setStyle_addBorder(cell, BorderType.LEFT, BorderLineType.THIN);
this.setStyle_addBorder(cell, BorderType.RIGHT, BorderLineType.THIN);
Which can only give me exact results per cell but I need it a little cleaner.
I cannot use cells.createRange() as it does not seem to exist. There is however one called:
NamedRange range = cells.createNamedRange("Notes", row, col, numRow, numCol);
range.setOutlineBorder(BorderLineType.THIN, Color.BLACK);
Except it does not work when tested. Any advice?
Thank you