Write a string to a worksheet cell. Args: row: The cell row (zero indexed). col: The cell column (zero indexed). string: Cell data. Str. format: An optional cell Format object. Returns: 0: Success.
(
self, row: int, col: int, string: str, cell_format: Optional[Format] = None
)
| 575 | |
| 576 | @convert_cell_args |
| 577 | def write_string( |
| 578 | self, row: int, col: int, string: str, cell_format: Optional[Format] = None |
| 579 | ) -> Literal[0, -1, -2]: |
| 580 | """ |
| 581 | Write a string to a worksheet cell. |
| 582 | |
| 583 | Args: |
| 584 | row: The cell row (zero indexed). |
| 585 | col: The cell column (zero indexed). |
| 586 | string: Cell data. Str. |
| 587 | format: An optional cell Format object. |
| 588 | |
| 589 | Returns: |
| 590 | 0: Success. |
| 591 | -1: Row or column is out of worksheet bounds. |
| 592 | -2: String truncated to 32k characters. |
| 593 | |
| 594 | """ |
| 595 | return self._write_string(row, col, string, cell_format) |
| 596 | |
| 597 | # Undecorated version of write_string(). |
| 598 | def _write_string( |