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

SYLK Comments #2276

Closed
SheetJSDev opened this issue Aug 19, 2021 · 2 comments
Closed

SYLK Comments #2276

SheetJSDev opened this issue Aug 19, 2021 · 2 comments

Comments

@SheetJSDev
Copy link
Contributor

This is:

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

This SYLK file includes cell comments:

ID;PWXL;N;E
P;PGeneral
F;P0;DG0G10;M320
B;Y3;X1;D0 0 9 0
C;Y1;X1;AZeratul:� :En Taro Adun!
C;Y2;X2;AArthas:� :Frostmourne Hungers.
C;Y1;X1;K1
C;Y1;X2;K2
C;Y2;X1;K3
E

(The control characters are \x1b and are part of the encoding of newlines characters)

The A field in SYLK apparently specifies a cell comment.

What is the expected behavior?

Comment text should be available at $sheet->getComment("A1")->getText() and $sheet->getComment("B2")->getText()

What is the current behavior?

No text is available

What are the steps to reproduce?

Save the SYLK codeblock to comment.slk and run

<?php

require 'vendor/autoload.php';

use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;

$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load("comment.slk");
$sheet = $spreadsheet->getActiveSheet();
print_r($sheet->getComment("B2")->getText());

Which versions of PhpSpreadsheet and PHP are affected?

All versions of PHPSpreadsheet and every commit of PHPExcel on github

@oleibman
Copy link
Collaborator

oleibman commented Aug 21, 2021

See #2267 for an additional issue regarding SYLK.

oleibman added a commit to oleibman/PhpSpreadsheet that referenced this issue Aug 22, 2021
oleibman added a commit that referenced this issue Aug 26, 2021
@PowerKiKi
Copy link
Member

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

3 participants