Skip to content

Conversation

@atymic
Copy link
Contributor

@atymic atymic commented Dec 27, 2021

No description provided.

@atymic
Copy link
Contributor Author

atymic commented Jan 31, 2022

cc @rap2hpoutre

@klimov-paul
Copy link

This does not seem right: if you need to limit the number of exported rows, you should apply limit at the DB query instance instead.

function usersGenerator() {
    foreach (User::query()->limit(100)->cursor() as $user) {
        yield $user;
    }
}

(new FastExcel(usersGenerator()))->export('test.xlsx');

@atymic
Copy link
Contributor Author

atymic commented Feb 8, 2022

This does not seem right: if you need to limit the number of exported rows, you should apply limit at the DB query instance instead.

This is for imports, not exports :)

@klimov-paul
Copy link

OK then.

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

Successfully merging this pull request may close these issues.

2 participants