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

Replacement in cell2coord will not work #141

Open
four-bytes-robby opened this issue Mar 13, 2024 · 4 comments
Open

Replacement in cell2coord will not work #141

four-bytes-robby opened this issue Mar 13, 2024 · 4 comments

Comments

@four-bytes-robby
Copy link

https://github.com/shuchkin/simplexlsxgen/blame/016bdc0f6d558a843a54b978749fa30ead7a834f/src/SimpleXLSXGen.php#L1185

As from what I understand the intention is to remove new line, tabs etc. from $cell. This will not work. Special character sequences will not be converted to its values in single colon strings. This should be a double colon.

@shuchkin
Copy link
Owner

Look, you got things mixed up, there cell address cleanup

$x = $y = 0;
SimpleXLSXGen::cell2coord(' B3 ', $x, $y); // $x = 1, $y = 2

@four-bytes-robby
Copy link
Author

Referring to this line of function cell2cord:
$cell = str_replace([' ', '\t', '\r', '\n', '\v', '\0'], '', $cell);

@shuchkin
Copy link
Owner

u right :)

@shuchkin
Copy link
Owner

removed

public static function cell2coord($cell, &$x, &$y)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants