Skip to main content

Python API to read, write, manipulate & convert Microsoft Excel® files without any dependency. Create & manipulate Workbooks, Worksheets, Pivot Tables, Charts, Sparklines, Conditional Formatting & more. Convert Excel to PDF, XPS, HTML, images & metafiles.

Project description

Python Excel API

Aspose.Cells for Python via Java is a scalable and feature-rich API to process Excel spreadsheets using Python. API offers Excel file creation, manipulation, conversion, & rendering. Developers can format worksheets, rows, columns or cells to the most granular level, create & manipulate chart & pivot tables, render worksheets, charts and specific data ranges to PDF & images, add & calculate Excel's builtin and custom formulas and much more - all without any dependency on Microsoft Office or Excel application.

Python Spreadsheet API Features

  • Create Excel files via API.
  • Create & refresh Pivot Tables & charts.
  • Create & manipulate sparklines & conditional formatting.
  • Convert charts to images or PDF.
  • Manage comments & hyperlinks.
  • Set complex formulas & calculate results via API.
  • Set protection on workbook, worksheet, cell, column or row.
  • Create & manipulate named ranges.
  • Populate worksheets through Smart Markers.
  • Convert worksheets to PDF, XPS & SVG formats.
  • Inter-convert files to popular Excel formats.

Read & Write Excel Files

Microsoft Excel: XLS, XLSX, XLSB, XLTX, XLTM, XLSM, XML OpenOffice: ODS Text: CSV, Tab-Delimited, TXT Web: HTML, MHTML

Save Excel Files As

Fixed Layout: PDF, XPS Images: JPEG, PNG, BMP, SVG, TIFF, GIF, EMF

Create Excel File from Scratch using Python

import jpype
import asposecells
jpype.startJVM()
from asposecells.api import Workbook, FileFormatType

workbook = Workbook(FileFormatType.XLSX)
workbook.getWorksheets().get(0).getCells().get("A1").putValue("Hello World")
workbook.save("output.xlsx")

jpype.shutdownJVM()

Create Excel Chart & Convert to Image via Python

import jpype
import asposecells
jpype.startJVM()
from asposecells.api import Workbook, Chart, ChartType, ImageOrPrintOptions

workbook = Workbook()
sheet = workbook.getWorksheets().get(0)
cells = sheet.getCells()
cells.get(0, 1).putValue("Income")
cells.get(1, 0).putValue("Company A")
cells.get(2, 0).putValue("Company B")
cells.get(3, 0).putValue("Company C")
cells.get(1, 1).putValue(10000)
cells.get(2, 1).putValue(20000)
cells.get(3, 1).putValue(30000)
chartIndex = sheet.getCharts().add(ChartType.COLUMN, 9, 9, 21, 15)
chart = sheet.getCharts().get(chartIndex)
chart.getNSeries().add("B2:B4", True)
chart.getNSeries().setCategoryData("A2:A4")
aSeries = chart.getNSeries().get(0)
aSeries.setName("=B1")
chart.setShowLegend(True)
chart.getTitle().setText("Income Analysis")

options = ImageOrPrintOptions()
options.setHorizontalResolution(300)
options.setVerticalResolution(300)
chart.toImage("chart.png", options)

jpype.shutdownJVM()

Product Page | Documentation | Blog | API Reference | Code Samples | Free Support | Temporary License | EULA

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aspose-cells-20.2.0.tar.gz (10.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aspose_cells-20.2.0-py3-none-any.whl (10.6 MB view details)

Uploaded Python 3

File details

Details for the file aspose-cells-20.2.0.tar.gz.

File metadata

  • Download URL: aspose-cells-20.2.0.tar.gz
  • Upload date:
  • Size: 10.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.4

File hashes

Hashes for aspose-cells-20.2.0.tar.gz
Algorithm Hash digest
SHA256 3e56ad75cf7b26cc54fd11ecc88fc1c145f7b8ca59b51f510cce9703c0875b23
MD5 82ee3773cdd89abd97a54948c76c056f
BLAKE2b-256 a90e92151e1b90dcd9277466b77a884dd91eee4805afb28579dbef0597b2680c

See more details on using hashes here.

File details

Details for the file aspose_cells-20.2.0-py3-none-any.whl.

File metadata

  • Download URL: aspose_cells-20.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.4

File hashes

Hashes for aspose_cells-20.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0e536f221a8a42ae2a593dd10a2a3a7f848fd9a7d307e598fa79c24a80a3638
MD5 fc6990d9bb4aeca195d12b45b97eeeac
BLAKE2b-256 f94280ca6a3cff0e6ffc191f3034c984326bee53a4c62221f5dc45ca279b78de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page