Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border doesn't work in ods #3690

Closed
mzawodzinski opened this issue Aug 29, 2023 · 1 comment · Fixed by #3693
Closed

Border doesn't work in ods #3690

mzawodzinski opened this issue Aug 29, 2023 · 1 comment · Fixed by #3693
Assignees
Labels
writer/ods Writer for Open/LibreOffice spreadsheet files (OASIS)

Comments

@mzawodzinski
Copy link

This is:

- [x] a bug report
- [ ] a feature request
- [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadsheet)

What is the expected behavior?

Generating a border in the ods file

What is the current behavior?

Border is invisible

What are the steps to reproduce?

<?php

$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$styleArray = [
    'borders' => [
        'outline' => [
            'borderStyle' => \PhpOffice\PhpSpreadsheet\Style\Border::BORDER_THICK,
            'color'       => ['argb' => '00000000'],
        ],
    ],
];

$spreadsheet->getActiveSheet()->getStyle('B2:I40')->applyFromArray($styleArray);


$writer = new PhpOffice\PhpSpreadsheet\Writer\Ods($spreadsheet);
$writer->save(__DIR__ . '/out/test.ods');

$writer2 = new PhpOffice\PhpSpreadsheet\Writer\Xlsx($spreadsheet);
$writer2->save(__DIR__ . '/out/test.xlsx');

in ods file:
image
in xlsx file:
image

Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet: 1.29
php: 8.1

@Progi1984 Progi1984 added the writer/ods Writer for Open/LibreOffice spreadsheet files (OASIS) label Aug 29, 2023
@Progi1984
Copy link
Member

@mzawodzinski I added a PR for this bug : #3693

@Progi1984 Progi1984 self-assigned this Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
writer/ods Writer for Open/LibreOffice spreadsheet files (OASIS)
Development

Successfully merging a pull request may close this issue.

2 participants