| 1 | <p align="center" width="100%"> |
| 2 | <img width="45%" src="https://github.com/user-attachments/assets/4afc1783-6461-4b98-93cb-b2a2a7f35169" alt="tksheet table"> |
| 3 | <img width="45%"src="https://github.com/user-attachments/assets/08e77e89-00ea-4c52-9222-9bd421284360" alt="tksheet treeview"> |
| 4 | </p> |
| 5 | |
| 6 | # <div align="center">tksheet - python tkinter table + treeview widget</div> |
| 7 | |
| 8 | [](https://pypi.python.org/pypi/tksheet/)  [](https://github.com/ragardner/tksheet/blob/master/LICENSE.txt) |
| 9 | |
| 10 | [](https://github.com/ragardner/tksheet/releases) [](https://pypi.org/project/tksheet/) |
| 11 | |
| 12 | <table> |
| 13 | <thead> |
| 14 | <tr> |
| 15 | <th style="color: lightgreen" colspan=2><strong>Help</strong></th> |
| 16 | </tr> |
| 17 | </thead> |
| 18 | <tbody> |
| 19 | <tr> |
| 20 | <td style="color: LightCoral">Versions 6.x.x →</td> |
| 21 | <td><a href="https://github.com/ragardner/tksheet/wiki/Version-6" target="_blank">Documentation</a></td> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td style="color: lightgreen">Versions 7.x.x →</td> |
| 25 | <td><a href="https://ragardner.github.io/tksheet/DOCUMENTATION.html" target="_blank">Documentation</a></td> |
| 26 | </tr> |
| 27 | <tr> |
| 28 | <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/blob/master/docs/CHANGELOG.md" target="_blank">Changelog</a></td> |
| 29 | </tr> |
| 30 | <tr> |
| 31 | <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#asking-questions" target="_blank">Questions</a></td> |
| 32 | </tr> |
| 33 | <tr> |
| 34 | <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#issues" target="_blank">Issues</a></td> |
| 35 | </tr> |
| 36 | <tr> |
| 37 | <td align="right" colspan="2"><a href="https://github.com/ragardner/tksheet/wiki/Version-7#enhancements-or-suggestions" target="_blank">Suggestions and Contributors</a></td> |
| 38 | </tr> |
| 39 | </tbody> |
| 40 | </table> |
| 41 | |
| 42 | ## **Features** |
| 43 | |
| 44 | - Smoothly display and modify tabular data |
| 45 | - [Edit cells directly](https://github.com/ragardner/tksheet/wiki/Version-7#table-functionality-and-bindings) |
| 46 | - Cell values can potentially be [any class](https://github.com/ragardner/tksheet/wiki/Version-7#data-formatting), the default is any class with a `__str__` method |
| 47 | - [Drag and drop columns and rows](https://github.com/ragardner/tksheet/wiki/Version-7#table-functionality-and-bindings) |
| 48 | - [Editable Treeview mode](https://github.com/ragardner/tksheet/wiki/Version-7#treeview-mode) with working drag and drop, undo, etc. |
| 49 | - Multiple line header and index cells |
| 50 | - [Expand row heights and column widths](https://github.com/ragardner/tksheet/wiki/Version-7#table-functionality-and-bindings) |
| 51 | - [Change fonts and font size (not for individual cells)](https://github.com/ragardner/tksheet/wiki/Version-7#text-font-and-alignment) |
| 52 | - [Change any colors in the sheet](https://github.com/ragardner/tksheet/wiki/Version-7#sheet-appearance) |
| 53 | - [Dropdown boxes](https://github.com/ragardner/tksheet/wiki/Version-7#dropdown-boxes) |
| 54 | - [Check boxes](https://github.com/ragardner/tksheet/wiki/Version-7#check-boxes) |
| 55 | - [Progress bars](https://github.com/ragardner/tksheet/wiki/Version-7#progress-bars) |
| 56 | - [Hide rows and/or columns](https://github.com/ragardner/tksheet/wiki/Version-7#example-header-dropdown-boxes-and-row-filtering) |
| 57 | - [Left `"w"`, Center `"center"` or Right `"e"` text alignment for any cell/row/column](https://github.com/ragardner/tksheet/wiki/Version-7#text-font-and-alignment) |
| 58 | - [In-built natural sorting](https://github.com/ragardner/tksheet/wiki/Version-7#sorting-the-table) |
| 59 | - [Optional built-in find window](https://github.com/ragardner/tksheet/wiki/Version-7#table-functionality-and-bindings) |
| 60 | |
| 61 | Note that due to the limitations of the Tkinter Canvas right-to-left (RTL) languages are not supported. |
| 62 | |
| 63 | ```python |
| 64 | """ |
| 65 | Versions 7+ have succinct and easy to read syntax: |
| 66 | """ |
| 67 | # set data |
| 68 | sheet["A1"].data = "edited cell A1" |
| 69 | |
| 70 | # get data |
| 71 | column_b = sheet["B"].data |
| 72 | |
| 73 | # add 2 empty columns and add the change to undo stack |
| 74 | sheet.insert_columns(columns=2, idx=4, undo=True) |
| 75 | |
| 76 | # delete columns 0 and 3 and add the change to undo stack |
| 77 | sheet.delete_columns(columns=[0, 3], undo=True) |
| 78 | ``` |
| 79 | |
| 80 | ### **light blue theme** |
| 81 | |
| 82 |  |
| 83 | |
| 84 | ### **dark theme** |
| 85 | |
| 86 |  |
| 87 | |
| 88 | ### **treeview mode** |
| 89 | |
| 90 |  |
| 91 | |
| 92 | ## **Changes for versions `7`+:** |
| 93 | |
| 94 | - **ALL** `extra_bindings()` event objects have changed, information [here](https://github.com/ragardner/tksheet/wiki/Version-7#bind-specific-table-functionality). |
| 95 | - The bound function for `extra_bindings()` with `"edit_cell"`/`"end_edit_cell"` **no longer** requires a return value and no longer sets the cell to the return value. Use [this](https://github.com/ragardner/tksheet/wiki/Version-7#validate-user-cell-edits) instead. |
| 96 | - `edit_cell_validation` has been removed and replaced with the function `edit_validation()`, information [here](https://github.com/ragardner/tksheet/wiki/Version-7#validate-user-cell-edits). |
| 97 | - Only Python versions >= `3.8` are supported. |
| 98 | - `tksheet` file names have been changed. |
| 99 | - Many other smaller changes, see the [changelog](https://github.com/ragardner/tksheet/blob/master/docs/CHANGELOG.md) for more information. |