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-foss

Installeer een specifieke versie:

pip install aspose-cells-foss==26.3.0

Upgrade een bestaande installatie:

pip install --upgrade aspose-cells-foss

2. 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-foss

3. 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

VereisteDetails
Python‑versie3.7 of later (3.9–3.12 aanbevolen)
BesturingssysteemWindows x86/x64, Linux (Ubuntu, CentOS, etc.), macOS x64/ARM64
Microsoft OfficeNiet vereist
pip‑afhankelijkhedenpycryptodome>=3.15.0, olefile>=0.46 (automatisch geïnstalleerd)

5. Pakketnaam vs. Importnaam

ContextNaam
PyPI / pip installaspose-cells-foss
Python importfrom 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-plugin

Gebruik:

from markitdown import MarkItDown

md = MarkItDown(enable_plugins=True)
result = md.convert("spreadsheet.xlsx")
print(result.text_content)  # Spreadsheet data as Markdown tables

Aanvullende bronnen

 Nederlands