Hey Python enthusiasts! ?
I'm excited to share a new open-source library I've been working on: ExcelHelper.
If you've ever found yourself wrestling with Excel files in Python, this library might just make your life a whole lot easier.
What is ExcelHelper?
ExcelHelper is a Python library that simplifies Excel manipulation using the openpyxl library. It provides an intuitive interface for common Excel operations, making it easier to work with spreadsheets programmatically.
Key Features:
Why ExcelHelper?
Quick Example:
from excel_helper import ExcelHelper excel = ExcelHelper("example.xlsx") excel.create_new_workbook() # Write data excel.write_range(1, 1, [ ["Product", "Quantity", "Price"], ["Apple", 10, 0.5], ["Banana", 15, 0.3], ["Orange", 8, 0.7] ]) # Calculate totals excel.set_formula(2, 4, "=B2*C2") excel.set_formula(3, 4, "=B3*C3") excel.set_formula(4, 4, "=B4*C4") # Sum quantities and totals excel.sum_range(2, 2, 4, 2, 5, 2) # Quantities excel.sum_range(2, 4, 4, 4, 5, 4) # Totals excel.auto_fit_columns() excel.save_workbook()
Getting Started:
Install with pip:
pip install excel-helper
Links:
Check out the GitHub repo for more examples and documentation. You can also find the package on PyPI for easy installation.
I'd love to hear your thoughts and feedback! Feel free to ask any questions or share your experience if you give it a try.
Happy coding! ??
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3