Repository navigation
Sync openpyxl-excel-spreadsheets-python with the updated tutorial - #970
Merged
realpython-bot merged 2 commits intoDec 1, 2026
Merged
realpython-bot merged 2 commits into
realpython-bot merged 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
realpython-bot
deleted the
maintenance/openpyxl-excel-spreadsheets-python-20261201
branch
December 1, 2026 13:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the sample code for A Guide to Excel Spreadsheets in Python With openpyxl to the existing
openpyxl-excel-spreadsheets-python/folder, which so far held only thereviews-sample.xlsxdataset.Under the standing rule, every tutorial that ships runnable code gets its code in a materials folder, plus a sample-code opt-in. The scripts mirror the update draft, one per tutorial section:
hello_world.py,append_data.py: creating and appending to a spreadsheetreading.py,iterating.py,products_dict.py: reading and iterating through the datasetclasses.py,mapping.py,parse_reviews.py: rows into data classescells_rows_columns.py,managing_sheets.py: basic operations (REPL sessions turned into scripts)freeze_and_filter.py,formulas.py,styles.py,conditional_formatting.pyadd_image.py,bar_chart.py,line_chart.pydb_classes.py,export_classes.py: data classes to a spreadsheet with a chartpandas_to_excel.py,excel_to_pandas.pyrequirements.txtpinsopenpyxl==3.1.5,pandas==3.1.0,Pillow==13.0.0, matching the draft'sdependenciesfield; the README states theminimum-python==3.11floorThe scripts read
reviews-sample.xlsx(the file the tutorial callssample.xlsx), so they run out of the box. The dataset is unchanged.Links:
How it was verified:
add_image.pywith a stand-inlogo.png).products_dict.pyreports 98 products,parse_reviews.pyprints theProduct(id='B00FALQ1ZC', parent=937001370, ...)/Review(id='R3O9SGZBVQBV76', customer_id=3653882, ...)pair, andexcel_to_pandas.pyprints theIndex([...], dtype='str'), the first 10 star ratings, and theR2EQL1V1L6E0C9row as the article shows them.ruff@0.14.1 format --check,ruff check, anddircheck.pyare clean.Note: the dataset's sheet is titled
amazon_reviews_us_Watches_v1_00-sample, while the article's REPL output shows'Sheet 1'. That's a gap in the article, not in this folder, so this PR doesn't change it.🤖 Generated with Claude Code