Aspose.Cells FOSS for Python هي مكتبة مجانية ومفتوحة المصدر للعمل مع ملفات الجداول الإلكترونية في تطبيقات بايثون. قم بتثبيتها بأمر واحد pip install aspose-cells-foss وابدأ بإنشاء دفاتر العمل، قراءة الخلايا، تطبيق الأنماط، بناء المخططات، وتصديرها إلى XLSX أو CSV أو TSV أو Markdown أو JSON، كل ذلك دون الحاجة إلى Microsoft Excel أو أي تبعية لمكتب Office.
تُظهر المكتبة واجهة برمجة تطبيقات نظيفة وبايثونية مبنية حول Workbook وWorksheet وCells وCell، وهي الكائنات المألوفة لكل مطور جداول إلكترونية. اقرأ واكتب الخلايا باستخدام تدوين الأقواس (ws.cells["A1"].value = "Hello")، وطبق الأنماط عليها باستخدام كائنات Font وFill، وأنشئ مخططات عمودية أو خطية باستخدام طريقتي add_bar() وadd_line() المخصصتين على ws.charts.
نظرًا لعدم اعتماد المكتبة على مكتبات Office الأصلية، فإنها تعمل بنفس الطريقة على أنظمة Windows وLinux وmacOS في بيئات CI، وحاويات Docker، والبيئات الخالية من الخوادم. حزمة markitdown-aspose-cells-plugin توسّع مكتبة Microsoft MarkItDown بدعم XLSX، مما يتيح تصدير كامل من دفتر العمل إلى Markdown باستدعاء واحد.
ws.cells["A1"] bracket notation.NotImplementedError on save).password parameter in one line.markitdown-aspose-cells-plugin adds XLSX export to MarkItDown.Aspose.Cells FOSS is installable with a single pip install aspose-cells-foss command. There are no native Office libraries or system packages to install. The library runs on any Python 3.7+ environment without compilation steps.
The API is intentionally small: Workbook, Worksheet, Cells, Cell, Font, Fill, and Chart cover the vast majority of real-world use cases. The codebase is MIT-licensed, hosted on GitHub, and accepts bug reports and pull requests.
Install with pip, then create a Workbook, access the first Worksheet, and write values directly to cells using bracket notation. The example also shows how to bold the header row by modifying the cell style before saving.
pip install aspose-cells-foss
from aspose.cells_foss import Workbook
wb = Workbook()
ws = wb.worksheets[0]
# Write values
ws.cells["A1"].value = "Product"
ws.cells["B1"].value = "Revenue"
ws.cells["A2"].value = "Widget"
ws.cells["B2"].value = 42000
# Bold the header row
for col in ["A1", "B1"]:
style = ws.cells[col].get_style()
style.font.bold = True
ws.cells[col].apply_style(style)
wb.save("report.xlsx")
Open the workbook saved above, add a bar chart over a range of rows, then call save() three times with different file extensions — XLSX, Markdown, and CSV — without changing any other code.
from aspose.cells_foss import Workbook
wb = Workbook("report.xlsx")
ws = wb.worksheets[0]
# Add a bar chart over rows 2-10
chart = ws.charts.add_bar(12, 0, 25, 6)
chart.n_series.add("B2:B10", True)
chart.title = "Revenue by Product"
wb.save("report_with_chart.xlsx")
# Export the same workbook to Markdown
wb.save("report.md")
# Or export to CSV
wb.save("report.csv")
It is a free, MIT-licensed Python library for creating, reading, modifying, and exporting Excel spreadsheets without requiring Microsoft Office.
XLSX for read/write. Export-only formats include CSV, TSV, Markdown, and JSON. Markdown export is built into the library via save_as_markdown() and requires no plugin. The optional markitdown-aspose-cells-plugin adds XLSX support to Microsoft’s MarkItDown library — it is a separate integration, not a requirement for Markdown export.
No. Aspose.Cells FOSS is a pure-Python library with no dependency on Microsoft Office, COM automation, or any proprietary runtime.
Run pip install aspose-cells-foss. No additional system packages or native extensions are required.
Yes. The library supports bar, line, pie, area, and stock chart types via dedicated chart-builder methods on ws.charts. These five types save to XLSX without error. Other chart types (scatter, combo, waterfall, etc.) can be created in memory but raise NotImplementedError when workbook.save() is called.
Yes. Pass a password parameter when saving to protect the workbook with AES encryption.
markitdown-aspose-cells-plugin integrates Aspose.Cells FOSS into Microsoft’s MarkItDown library, enabling full XLSX-to-Markdown conversion with a single call.
The source code, issue tracker, and contribution guide are available on GitHub under the MIT license.