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

Different nextRow() behaviors #98

Closed
SoGCuicui opened this issue Nov 28, 2024 · 1 comment
Closed

Different nextRow() behaviors #98

SoGCuicui opened this issue Nov 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SoGCuicui
Copy link

Concidering the following code:

require_once __DIR__ . "/vendor/autoload.php";

$excel = avadim\FastExcelWriter\Excel::create(["Row by Row", "Direct"]);

$sheet = $excel->getSheet("Row by Row");
$sheet->writeRow(["foo", "bar"])->nextRow();
$sheet->writeRow(["foo", "bar"]);

$sheet = $excel->getSheet("Direct");
$area = $sheet->beginArea(); // "Direct" writing
$area->writeRow(["foo", "bar"])->nextRow();
$area->writeRow(["foo", "bar"]);

$excel->save(__DIR__ . "/test.xlsx");

In the first "Row by Row" tab, the two lines follow each other, making the first nextRow() call basically useless.
(Except at least for a subsequent call to $sheet->getCurrentRowId();, that then returns 1 if nextRow() is there, and 0 if not.)

In the second "Direct" tab, the two lines are separated by an empty one (as expected, I guess).

Would it be possible to have the same behavior in both cases?

@aVadim483 aVadim483 added the bug Something isn't working label Dec 22, 2024
@aVadim483
Copy link
Owner

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants