-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.power
More file actions
16 lines (16 loc) · 888 Bytes
/
code.power
File metadata and controls
16 lines (16 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
* Stream rows from a CSV or Excel file one by one using yield.
*
* @param string $filePath The path to the file.
* @param int $startRow The starting row index.
* @param int $chunkSize The number of rows to read per chunk.
* @param int $activeSheet The index of the active worksheet 0=default.
*
* @return \Generator A generator that yields each row as an array.
* @throws \InvalidArgumentException If the file does not exist.
* @throws \OutOfRangeException If the start row is beyond the highest row, no rows can be processed.
* @throws ReaderException If there is an error identifying or reading the file.
* @throws SpreadsheetException If there is an error working with the spreadsheet.
* @since 3.2.0
*/
public function read(string $filePath, int $startRow, int $chunkSize, int $activeSheet = 0): \Generator;