# Next row with rich text

* Extension version `1.6.0` or later;
* Build with `--enable-reader`;

`nextRowRich()` behaves like `nextRow()`, but string cells are returned as an array of rich-text runs that preserve per-segment font attributes.

## Methods

```php
nextRowRich(): ?array
```

## Return value

The current row's cells, or `null` when the iterator is exhausted.

* String / shared-string cells become an array of runs:
  * `text` *(string)* — run text;
  * `font` *(array)* — `{name, size, bold, italic, strike, underline, color}`; missing attributes are `null`.
* All other cell types (number, datetime, boolean, error, blank) keep the same raw value as `nextRow()`.

## Example

```php
$config = ['path' => './tests'];
$excel  = new \Vtiful\Kernel\Excel($config);

$excel->openFile('source.xlsx')->openSheet();

while (($row = $excel->nextRowRich()) !== null) {
    print_r($row);
}
// Example row:
// Array
// (
//     [0] => Array
//         (
//             [0] => Array
//                 (
//                     [text] => Hello
//                     [font] => Array ( [name] => Calibri [size] => 11 [bold] => 1 [italic] => 0 ... )
//                 )
//             [1] => Array ( [text] =>  world, [font] => Array (...) )
//         )
//     [1] => 42        // numeric cells keep their raw value
// )
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xlswriter-docs.viest.me/english/reader/next-row-rich.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
