{"id":26731,"library":"aspose-cells","title":"Aspose.Cells for Python via Java","description":"Aspose.Cells for Python via Java is a high-performance library for Excel file manipulation and conversion. Current version 26.4.0 supports Python 3.8–3.13. It allows creating, editing, and converting spreadsheets (XLS, XLSX, XLSB, ODS, CSV, HTML) without Microsoft Office. Release cadence: monthly updates.","status":"active","version":"26.4.0","language":"python","source_language":"en","source_url":"https://git.nb.o/libraries/aspose-cells-python","tags":["excel","xlsx","spreadsheet","conversion","java-bridge"],"install":[{"cmd":"pip install aspose-cells","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for Java bridge; automatically installed","package":"jpype1","optional":false}],"imports":[{"note":"Most classes are under asposecells.api submodule.","wrong":"from asposecells import License","symbol":"License","correct":"from asposecells.api import License"},{"note":"Workbook is located in asposecells.api.","wrong":"from asposecells import Workbook","symbol":"Workbook","correct":"from asposecells.api import Workbook"},{"note":"SaveFormat is an enum in asposecells.api.","wrong":"import asposecells.SaveFormat","symbol":"SaveFormat","correct":"from asposecells.api import SaveFormat"},{"note":"FileFormatType is part of asposecells.api.","wrong":"from asposecells import FileFormatType","symbol":"FileFormatType","correct":"from asposecells.api import FileFormatType"}],"quickstart":{"code":"import os\nfrom asposecells.api import Workbook, License, SaveFormat, FileFormatType\n\n# Set license (optional; if not set, watermark appears)\n# license = License()\n# license.set_license(os.environ.get('ASPOSE_LICENSE_PATH', ''))\n\n# Create a new workbook\nwb = Workbook()\n\n# Get the first worksheet\nws = wb.getWorksheets().get(0)\n\n# Add text\nws.getCells().get(\"A1\").putValue(\"Hello, Aspose.Cells!\")\n\n# Save as XLSX\nwb.save(\"output.xlsx\", SaveFormat.XLSX)\nprint(\"Excel file created successfully.\")","lang":"python","description":"Minimal example: create a workbook, add text, save as XLSX."},"warnings":[{"fix":"Install Java 8 or later (e.g., OpenJDK) and ensure JAVA_HOME is set.","message":"Aspose.Cells for Python via Java requires Java Runtime (JRE) installed. The library uses a Java bridge via JPype. Without JRE, import fails.","severity":"breaking","affected_versions":"all"},{"fix":"Set environment variable: JAVA_OPTS='-Djava.awt.headless=true' or in code: import os; os.environ['JAVA_OPTS'] = '-Djava.awt.headless=true' before importing asposecells.","message":"The library is not recommended for headless Linux servers without a display? Actually, it works headless, but some chart rendering requires a display. Use Xvfb or set Java AWT headless property.","severity":"gotcha","affected_versions":"all"},{"fix":"Use SaveOptions subclasses (e.g., XlsxSaveOptions()) or use SaveFormat directly but prepare for removal.","message":"The method `Workbook.save(String, SaveFormat)` with file format argument is deprecated in favor of `Workbook.save(String, SaveOptions)`. The old overload still works but may raise warnings.","severity":"deprecated","affected_versions":">=23.7"},{"fix":"Use `from asposecells.api import Workbook` instead of `import asposecells`.","message":"Importing from asposecells directly (e.g., `import asposecells`) does not expose classes. Must import from asposecells.api.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install aspose-cells","cause":"aspose-cells is not installed, or installed as a different package name.","error":"ModuleNotFoundError: No module named 'asposecells'"},{"fix":"Reinstall aspose-cells: pip install --upgrade --force-reinstall aspose-cells. Ensure Java 8+ is installed.","cause":"Java bridge cannot find Aspose.Cells Java JAR file. Usually happens if the JAR was not extracted properly or Java version incompatible.","error":"jpype._jexception.Exception: java.lang.ClassNotFoundException: com.aspose.cells.License"},{"fix":"Use: from asposecells.api import Workbook","cause":"Trying to import Workbook from the wrong location (asposecells instead of asposecells.api).","error":"AttributeError: module 'asposecells' has no attribute 'Workbook'"},{"fix":"Set JAVA_HOME to JRE installation root (e.g., export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64).","cause":"JPype cannot find the JVM shared library. JAVA_HOME not set or incorrect.","error":"java.lang.UnsatisfiedLinkError: no jvm in java.library.path: /usr/lib/jvm/java-11-openjdk-amd64/lib/server"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}