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

Comment box text alignment #1788

Closed
prfardin opened this issue Jan 13, 2021 · 1 comment
Closed

Comment box text alignment #1788

prfardin opened this issue Jan 13, 2021 · 1 comment

Comments

@prfardin
Copy link

prfardin commented Jan 13, 2021

how i can set alignment for comment box text!
im using laravel https://github.com/maatwebsite/Laravel-Excel and here's my code :
` $row = $failuresRow['row'];
$commentRichText = $event->sheet->getDelegate()
->getComment($key.$row)
->getText()
->createTextRun('PhpSpreadsheet:');
$commentRichText->getFont()->setBold(true);
$event->sheet->getDelegate()
->getComment($key.$row)
->getText()->createTextRun("\r\n");
$event->sheet->getDelegate()
->getComment($key.$row)
->getText()->createTextRun($columnError['errors']);

$event->sheet->getDelegate()->getComment($key.$row)
->setAlignment(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER_CONTINUOUS);
$event->sheet->getDelegate()->getComment($key.$row)->setWidth("200px");
$event->sheet->getDelegate()->getComment($key.$row)->getFillColor()->setARGB('FFFFFFFF'); `

@oleibman
Copy link
Collaborator

oleibman commented May 7, 2024

Functionality added by PR #4006. Closing issue.

@oleibman oleibman closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants