Skip to content

Border in vertical merged cell #4397

Open
@marcopiai

Description

@marcopiai

I have this problem setting border in vertical merged cell (getOutline())
the border is visible only on the top, left and right of the first cell of the merged group

this is the code:
`<?php

require 'vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
use PhpOffice\PhpSpreadsheet\Style\Border;
use PhpOffice\PhpSpreadsheet\Style\Color;

$spreadsheet = new Spreadsheet();
$activeWorksheet = $spreadsheet->getActiveSheet();

$activeWorksheet->setCellValue('B3', 'TEST');
$activeWorksheet->mergeCells("B3:B10");
$activeWorksheet->getStyle('B3')->getBorders()->getOutline()->setBorderStyle(Border::BORDER_THIN)->setColor(new Color('00000000'));

$writer = new Xlsx($spreadsheet);

header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment; filename="bugtest.xlsx"');
$writer->save('php://output');

?>`

the result on excel is:

Image

any suggest?
could be a bug?

Thanks
Marco Piai

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions