Installatie
Installatie van Aspose.Cells FOSS voor Python
Aspose.Cells FOSS for Python wordt gedistribueerd als een standaard Python‑pakket op PyPI onder de naam aspose-cells-foss. De aanbevolen installatiemethode is pip, die alle afhankelijkheden automatisch afhandelt.
1. pip (Aanbevolen)
pip is de standaard manier om Aspose.Cells FOSS voor Python te installeren. Er zijn geen extra tools of buildstappen vereist.
Installeer de nieuwste versie:
pip install aspose-cells-fossInstalleer een specifieke versie:
pip install aspose-cells-foss==26.3.0Upgrade een bestaande installatie:
pip install --upgrade aspose-cells-foss2. Virtuele omgeving (Aanbevolen voor projecten)
Het gebruik van een virtuele omgeving isoleert de afhankelijkheden van je project van de systeem‑Python‑installatie.
Maak en activeer een virtuele omgeving:
##Create
python -m venv .venv
##Activate on Linux/macOS
source .venv/bin/activate
##Activate on Windows
.venv\Scripts\activate
##Install
pip install aspose-cells-foss3. Verifieer de installatie
Na de installatie voert u het volgende fragment uit om te bevestigen dat de bibliotheek correct wordt geladen:
from aspose.cells_foss import Workbook, Cell
workbook = Workbook()
workbook.worksheets[0].cells["A1"].value = "Installation verified!"
workbook.save("verify.xlsx")
print("Aspose.Cells FOSS for Python is installed correctly.")Als het bestand verify.xlsx zonder fouten wordt aangemaakt, is de installatie voltooid.
4. Systeemvereisten
| Vereiste | Details |
|---|---|
| Python‑versie | 3.7 of later (3.9–3.12 aanbevolen) |
| Besturingssysteem | Windows x86/x64, Linux (Ubuntu, CentOS, etc.), macOS x64/ARM64 |
| Microsoft Office | Niet vereist |
| pip‑afhankelijkheden | pycryptodome>=3.15.0, olefile>=0.46 (automatisch geïnstalleerd) |
5. Pakketnaam vs. Importnaam
| Context | Naam |
|---|---|
| PyPI / pip install | aspose-cells-foss |
| Python import | from aspose.cells_foss import ... |
De pip‑pakketnaam gebruikt een koppelteken (aspose-cells-foss) terwijl de Python‑import puntnotatie gebruikt (aspose.cells_foss). Dit volgt de namespace‑pakketconventie.
6. Plugininstallatie
markitdown-aspose-cells-plugin
Breidt de Microsoft MarkItDown bibliotheek uit met ondersteuning voor het XLSX‑formaat:
pip install markitdown-aspose-cells-pluginGebruik:
from markitdown import MarkItDown
md = MarkItDown(enable_plugins=True)
result = md.convert("spreadsheet.xlsx")
print(result.text_content) # Spreadsheet data as Markdown tablesAanvullende bronnen
- Aspose.Cells FOSS for Python: PyPI
- GitHub-repository
- Aspose.Cells FOSS for Python: Ontwikkelaarsgids
- Aspose.Cells FOSS for Python: API-referentie
- Kennisbank: taakgerichte how-to‑handleidingen
- Productoverzicht: samenvatting van functies en mogelijkheden
- Blog: Introductie van Aspose.Cells FOSS: bibliotheekoverzicht en snelle start
- Gratis ondersteuningsforum